-
Notifications
You must be signed in to change notification settings - Fork 65
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
Multiface fonts supported in load but not range #125
Comments
Testing with a multiface font (ttc): current node-fontnik |
We've never properly supported multiface fonts, IIRC because we couldn't find a suitable test fixture when originally writing this. There's a catch in the That said, yes, this is likely a copy/paste error for an edge case we haven't properly tested/supported. I'm not clear on why it would infinite loop inside |
Great. If downstream users have been throwing on multiface fonts then we've been isolated from the bug (of not reading them all) in RangeAsync.
False alarm. Further profiling shows that it is actually not an infinite loop, but rather just extremely slow execution. I was running in debug mode. Processing this ttc takes over 3 minutes with I good, freely available, ttc testcase is https://github.com/googlei18n/noto-fonts/blob/master/hinted/NotoSans-Regular.ttc which just takes 5s to process (still in Debug mode). |
Fonts with multiple faces are supported by looping over each face and accessing the number of faces once a valid FT_Face object is available. Like we do here:
node-fontnik/src/glyphs.cpp
Line 197 in 35feb88
ft_face->num_faces
:node-fontnik/src/glyphs.cpp
Lines 205 to 206 in 35feb88
But the
num_faces = ft_face->num_faces;
is only done inLoadAsync
and notRangeAsync
/cc @mikemorris
The text was updated successfully, but these errors were encountered: