components-ai / typefaces

Collection of Google fonts as typeface data for usage with three.js, react-three-fiber, and other tools.
https://components.ai/docs/typefaces
MIT License
73 stars 2 forks source link

Glyphs are being dropped in our 3d converter #7

Open johno opened 3 years ago

johno commented 3 years ago

It was reported that non-latin glyphs are being dropped and result in improper output for typefaces that include other glyphs.

To reproduce, visit the Noto Sans Page and input one of these glyphs.

image

Guillaume-Levrier commented 3 years ago

Thank you for looking into this!

deanblacc commented 3 years ago

It looks like the issue is with OpenType and how it parses certain kinds of .tff fonts, which are mapped using a cmap3 method. Those font are currently still not supported by OpenType. There are some related issues here and here.

Guillaume-Levrier commented 3 years ago

Just to make sure I interpret your answer correctly: do you have another way of mapping non-latin chars or are you dropping all such fonts?

deanblacc commented 3 years ago

@Guillaume-Levrier My bad if that wasn't clear. So, we use the OpenType library to parse font data for the glyph paths. OpenType doesn't currently support certain kinds of .ttf and for the moment at least we can only support what OpenType supports.

Guillaume-Levrier commented 3 years ago

Got it, thanks!