Discussion:
[fontforge-users] Generating TTF in Mac Latin (Roman?) Encoding
Abraham Lee
2016-07-19 18:15:41 UTC
Permalink
Hey, everyone!

For no other reason than "this is what a particular app expects", I need to
generate a TTF with glyphs encoded per "Macintosh Latin". When I open the
"reference" font, it shows "(Mac)" in the window's title bar. The SFD file
is encoded correctly, but when I try to generate a binary font, it changes.

I see there are several "Generate Fonts..." type options that (I think) are
relevant, including:

- TrueType (yields a .ttf)
- TrueType (MacBin) (yields a .bin)
- TrueType (Mac dfont) (yields a .dfont)

I've tried generating both a .ttf and .dfont, but the encoding gets changed
to "UnicodeBMP" in both cases, which I don't want.

What am I missing? A separate setting?

Any suggestions are VERY welcome!

Best,
Abraham
Dave Crossland
2016-07-20 13:11:19 UTC
Permalink
I think there's an encoding menu where you can set this before generating
Abraham Lee
2016-07-20 15:27:20 UTC
Permalink
Thanks for the response, Dave.
Post by Dave Crossland
I think there's an encoding menu where you can set this before generating
There is, but that's why I'm confused. Before generating the TTF, the
encoding is set to "Macintosh Latin" (showing "Mac" in the window
titlebar). I generate the TTF with default options. After generating the
TTF, the encoding is somehow set to "UnicodeFull". What am I doing wrong?
I'm on Windows 7, using FF 20160407.

I can confirm that the line "Encoding: Mac" is shown in the SFD file, but
when I open the file (with the Python API) it shows up as a "Custom"
encoding instead. Is there anything that can be done?

--
Abraham
Abraham Lee
2016-07-22 15:22:52 UTC
Permalink
I figured it out, though I'm not sure how I missed it before. The correct
"Generate Fonts..." output option needed to be "TrueType (Symbol)". That
was enough to maintain the "Macintosh Latin" encoding that I needed. Sorry
for the noise. BTW, in case anyone was curious how to select that option in
the Python API, the correct syntax is:

font.generate('filename.ttf', flags=("symbol",))

Best,
Abraham
Post by Abraham Lee
Thanks for the response, Dave.
Post by Dave Crossland
I think there's an encoding menu where you can set this before generating
There is, but that's why I'm confused. Before generating the TTF, the
encoding is set to "Macintosh Latin" (showing "Mac" in the window
titlebar). I generate the TTF with default options. After generating the
TTF, the encoding is somehow set to "UnicodeFull". What am I doing wrong?
I'm on Windows 7, using FF 20160407.
I can confirm that the line "Encoding: Mac" is shown in the SFD file, but
when I open the file (with the Python API) it shows up as a "Custom"
encoding instead. Is there anything that can be done?
--
Abraham
Dave Crossland
2016-07-22 15:29:48 UTC
Permalink
Great to know you cracked it :)

Loading...