[squeak-dev] TrueTypeFont and Unicode Characters

Eric Gade eric.gade at gmail.com
Tue Aug 4 20:49:08 UTC 2020


Hello all,

I wanted to revisit this issue as I'm working on it again. Back in April,
Tobias mentioned the following:

I'm not sure we are actually loading all glyphs.
> Also note, that nothing in the font (like substitiution tables) are
> actually supported :/
> sorry.
>

It appears that the particular ancient fonts that I'm using
<https://www.hethport.uni-wuerzburg.de/cuneifont/> -- and other ancient
fonts whose codepoints are now part of the Unicode standard -- make use of
substitution in order to access points beyond 65535 (a full unsigned 16
bits). I know this to be true for my particular Akkadian fonts because if I
dig into the code I am able to render the glyphs that TTFontReader has
parsed out of the file, but only if I modify the
renderGlyph:height:fgColor:bgColor:depth: message to look in the Font
description's table of glyphs (rather than the codepoint sparsetable, which
is 65535 entries long and has no glyphs at all  in it).

Is there some deep reason not to support GSUB (substitution), aside from
the complexity of ligatures? Right now if a TTF file has a GSUB entry it's
not even being parsed out by TTFontReader. I'm really bumping around in the
dark here, but I might be able to come up with something that at least
permits the use of straight 1 to 1 substitutions. Any thoughts or ideas?

I'm attaching a few screenshots that can give a better idea of what I've
done just to get something to render properly. I created a modified version
of renderGlyph: (etc, etc).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200804/1f60de0b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Workspace.png
Type: image/png
Size: 10683 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200804/1f60de0b/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TTFontDescription.png
Type: image/png
Size: 92101 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200804/1f60de0b/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CuneiformRendered.png
Type: image/png
Size: 6546 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200804/1f60de0b/attachment-0005.png>


More information about the Squeak-dev mailing list