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

Fixing a crash on mutli-byte Unicode characters in MOAIFreetypeFont:dimensionsOfLine #132

Open
wants to merge 2 commits into
base: mindsnacks-dev
Choose a base branch
from

Commits on Nov 4, 2021

  1. Fixed the comparison statement in the first for loop in `Dimensions…

    …OfLine`. Previously, there was an intermittent crash in this method that happened when `deleteGlyphArray` got called, which called `FT_Done_Glyph` on glyphs that hadn't been initialized. They weren't initialized because the `for` loop ended before `maxGlyphs`... since `u8_nextchar` incremented `n` by a value greater than 1 when it encountered multi-byte characters.
    aab29 committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    59bbaaa View commit details
    Browse the repository at this point in the history
  2. Switched the way that maxGlyphs gets calculated in `RenderTextureSi…

    …ngleLine` to use `glyphsInText` instead of `strlen`. `strlen` did not properly count multi-byte characters, which sometimes led to extra glyphs getting rendered at the end of a line.
    aab29 committed Nov 4, 2021
    Configuration menu
    Copy the full SHA
    1b9a283 View commit details
    Browse the repository at this point in the history