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 on-demand glyph loading #4779

Merged

Commits on Jan 30, 2020

  1. Rename m_ranges to m_invalid_glyphs

    Rename containsGlyph to isValidGlyph
    Change the approach to checking if a font can handle a glyph. The original approach was to pass the valid glyph range to the constructor. When it's not found by ImGui we call AddGlyph where we check if it's valid for the font. In the event where ImGui couldn't handle a glyph that was defined as valid in the constructor, that led to constant re-baking of fonts. The new approach is to change m_ranges (which used to contain valid glyph ranges) to m_invalid_glyphs, which contains only invalid glyphs that we tried to add to the font but failed. The next time AddGlyph is called, we skip the font since it's unable to handle the glyph.
    vakhoir committed Jan 30, 2020
    Configuration menu
    Copy the full SHA
    13f7645 View commit details
    Browse the repository at this point in the history