Skip to content

Multiface fonts supported in load but not range #125

Closed as not planned
Closed as not planned

Description

@springmeyer

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:

But the num_faces = ft_face->num_faces; is only done in LoadAsync and not RangeAsync

/cc @mikemorris

Activity

  1. springmeyer commented on Nov 22, 2016

    @springmeyer
    ContributorAuthor

    Testing with a multiface font (ttc): current node-fontnik master goes into an infinite loop in RenderSDF in RangeAsync.

  2. mikemorris commented on Nov 22, 2016

    @mikemorris
    Contributor

    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 fontmachine downstream implementation to prevent calling RangeAsync so I don't think we would ever hit this case in production.

    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 RenderSDF though, is there anything else different about this test fixture aside from multiple faces? Can you tell where inside RenderSDF its looping?

  3. springmeyer commented on Nov 22, 2016

    @springmeyer
    ContributorAuthor

    There's a catch in the fontmachine downstream implementation to prevent calling RangeAsync so I don't think we would ever hit this case in production.

    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.

    Testing with a multiface font (ttc): current node-fontnik master goes into an infinite loop in RenderSDF 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 bin/build-glyphs, which is crazy. This font seems to have more data, but such slow processing is still worrysome.

    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).

  4. added a commit that references this issue on Nov 23, 2016
  5. jcary741 commented on Oct 13, 2026

    @jcary741

    Closing as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions