Skip to content

Parse cmap table format 14 and handle Unicode Variation Sequences (UVSes) #581

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 5 commits into from
Mar 5, 2023

Conversation

Connum
Copy link
Contributor

@Connum Connum commented Mar 2, 2023

Description

This PR implements parsing of cmap table format 14 and applying Unicode Variation Sequences (UVSes) during rendering.
Writing is not yet implemented and will be added later in a separate PR.

Motivation and Context

This will get rid of the .null glyph being displayed for variation selectors in text and swap the base character to the desired variation if supported by the font. We'll pass tests CMAP-1 and CMAP-2 of the Unicode test report tool as a result.

How Has This Been Tested?

Added tests, tested with fonts, ran the Unicode test report (with #568 implemented in a test branch).

Screenshots (if appropriate):

image
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 requested review from yne and ILOVEPIE March 2, 2023 19:18
@ILOVEPIE
Copy link
Contributor

ILOVEPIE commented Mar 2, 2023

I'll review it after work today

@Connum Connum added this to the Release 2.0.0 milestone Mar 2, 2023
@Connum Connum added enhancement Spec Related to the implementation of the Opentype specification labels Mar 2, 2023
Copy link
Contributor

@ILOVEPIE ILOVEPIE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've written a few comments/questions, once those are discussed I will do an approving review. They aren't necessarily show-stoppers so I'm not going to request changes, but we should discuss them.

@Connum Connum force-pushed the feature/cmap-format14-uvses branch from 5e5e241 to a5bc2a7 Compare March 3, 2023 23:23
@Connum
Copy link
Contributor Author

Connum commented Mar 3, 2023

rebased on current master

@Connum Connum requested a review from ILOVEPIE March 4, 2023 01:37
@Connum Connum requested a review from yne March 5, 2023 16:52
Copy link
Contributor

@ILOVEPIE ILOVEPIE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

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.

3 participants