Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FontForge can't even understand the simplest possible compact CID-keyed font #3951

Open
ctrlcctrlv opened this issue Sep 23, 2019 · 0 comments
Labels

Comments

@ctrlcctrlv
Copy link
Member

My title assumes a CID-keyed font is any font with a cmap table. I'm not sure if that's true, but I emailed a few people who might know. If they reply I'll update this issue.

Let's also say, FontForge created the font it can't understand!! This CID-keyed font stuff is stressing me out. 🤐

Let's make the font first:

  1. New font
  2. Encoding→Re-encode→Custom
  3. Encoding→Remove Unused Slots
  4. Encoding→Add Encoding Slots…→1
  5. Draw a square (or whatever) in the new glyph
  6. Right-click the glyph, «Glyph Info…»
  7. Set name to percent, then «Set From Name»
  8. Under «Alternate Unicode Encodings» put U+00A7, leave Variation Selector at 0
  9. Save SFD as brokencmap.sfd, generate font brokencmap.otf.
  10. Quit FontForge

Now let's see how broken our new font is.
KFontView understands it just fine as a font with two glyphs, percent and section:

Let's open our font back in FontForge…Open OTF and do «Encoding→Compact».

Go to Metrics View, then enter :
2019-09-23-170216_2232x801_scrot

Looks good, but the FontView displays two percent signs, both with encoding U+25.
2019-09-23-170419_1612x635_scrot
2019-09-23-170437_1612x635_scrot

brokencmap.zip

@ctrlcctrlv ctrlcctrlv added the CID label Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant