Skip to content

handle CMAP format 0 for platform 1, encoding 0 (legacy Macintosh encoding) #634

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

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

Connum
Copy link
Contributor

@Connum Connum commented Nov 2, 2023

Description

Adds support for Macintosh encoding in the form of CMAP table format 0 with platformId 1 and encodingId 0.

Motivation and Context

Although deprecated, older fonts may still use this encoding format.
The CMAP-3 test case of the unicode test tool failed for Opentype.js and didn't show any glyphs at all. The tests are still not marked as conformant after this PR due to small decimal rounding differences, but that is a separate issue and visually the glyphs render OK.

How Has This Been Tested?

Added tests, ran the unicode test tool with the local dev branch and compared the outlines.

Screenshots (if appropriate):

image
unicode test tool test case CMAP-3 before:
image
unicode test tool test case CMAP-3 after:
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I did npm run test and all tests passed green (including code styling checks).
  • I have added tests to cover my changes.
  • My change requires a change to the documentation.
  • I have updated the README accordingly.
  • I have read the CONTRIBUTING document.

@Connum Connum added enhancement Spec Related to the implementation of the Opentype specification labels Nov 2, 2023
@Connum Connum force-pushed the fix/cmap-macos-turkish branch from 44a2944 to 7d3486c Compare November 5, 2023 15:48
@Connum Connum requested review from ILOVEPIE and yne November 5, 2023 15:49
@Connum Connum added this to the Release 2.0.0 milestone Nov 5, 2023
@Connum Connum force-pushed the fix/cmap-macos-turkish branch from 7d3486c to adea319 Compare November 5, 2023 16:42
@Connum Connum merged commit 96d133f into master Nov 5, 2023
@Connum Connum deleted the fix/cmap-macos-turkish branch November 5, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Spec Related to the implementation of the Opentype specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants