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

Fix: missing glyphs with multiple unicodes #31

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

shuaibird
Copy link
Contributor

Description

For glyphs with multiple unicodes, some of them wouldn't be included in the generated json file, which leads to the characters missing issue when the json is loaded in Three.js.
This pull request is created for fixing it in a non-breaking way.

Motivation and Context

Among non-latin characters, some of them are bound to multiple unicodes, but when the character is decoded in javascript runtime, only one of the unicode would be decoded.
Here's a screenshot for better explanation.
Screenshot 2023-07-14 at 12 40 33
Here's a related unresolved issue. #25
Here's an open PR attempting to solve the same issue. #22

How Has This Been Tested?

Here's the link of the fixed version. https://shuaibird.github.io/facetype.js/
A font file with the character is uploaded in both the original version (A) & the forked version (B).

  • Download both the generated json file without restrict set, load the files to render the character in Three.js, only the json downloaded from B succeeds.
  • Download both the generated json file with restrict set to , check the generated files, only the json downloaded from B contains the glyph.

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)

Checklist:

  • My code follows the code style of this project.

@gero3 gero3 merged commit a2ad86e into gero3:gh-pages Jul 14, 2023
@gero3
Copy link
Owner

gero3 commented Jul 14, 2023

thanks

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