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

Add support for platform 0, platform encoding 3 in TTF/OTF 'cmap' table #103

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MatthiasValvekens
Copy link
Contributor

This is one of the ways to represent the Unicode BMP, and for our purposes can be handled in approximately the same way as (3, 1). It's used (among other places) in some of the fonts that ship with macOS.

The test font files included in this commit were generated from this file: https://github.com/RazrFalcon/ttf-parser/blob/337e7d1c08b06478a84c4345f4f289fc2cb9210c/tests/fonts-src/glyphs.ttx. I applied a few minor modifications to allow iText to open the font (required re-adding the name table) and to increase test coverage (by creating a version using a format 6 cmap subtable as well). The content in the linked repo is dual-licensed under MIT and Apache 2, so that should be OK.

Platform 0, encoding 3 is one of the ways to represent the Unicode BMP,
and for our purposes can be handled in approximately the same way as (3, 1).
It's used (among other places) in some of the fonts that ship with
macOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant