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

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.
@AnhelinaM
Copy link
Contributor

Hello, Matthias! Thank you for your changes, they are merged into current develop: 172526e

@AnhelinaM AnhelinaM closed this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants