Skip to content

True Type Font not working with Emscripten #6745

Closed

Description

@Jonathhhan

And I am quite sure it was working with an earlier version of Emscripten / OF. For example --> examples --> graphics --> fontsExample --> does not work with Emscripten.

Activity

  1. Jonathhhan commented on Jul 11, 2021

    @Jonathhhan
    ContributorAuthor

    I think I found a solution:
    I changed line 617 from ofTrueTypeFont.cpp from:

    auto err = FT_Load_Glyph( face.get(), FT_Get_Char_Index( face.get(), utf8 ), settings.antialiased ? FT_LOAD_FORCE_AUTOHINT : FT_LOAD_DEFAULT );
    to:

    auto err = FT_Load_Glyph( face.get(), FT_Get_Char_Index( face.get(), utf8 ), FT_LOAD_DEFAULT);
    I am courius if there a any drawbacks with changing the line, but so far it seems to work well.
    It works without this change if the font is not antialiased (which is not the default). For example: verdana14A.load("verdana.ttf", 14, false);

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions