You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix potential CoreText font rendering infinite recursion
The function `recurseDraw` is actually a misnomer. It uses recursion in
a way that is unnecessary as it's a simple while loop that keeps drawing
as many characters as possible until all are drawn. The recursion is
just a convenience to invoke the CoreText rendering code. If the API for
`CTFontGetGlyphsForCharacters` works as expected, in theory we shouldn't
get infinite recursion since `lookupFont` calls the same function, but
just for safety and to avoid potential subtle interactions, just kill
the recursion and directly draw the texts in the loop to make it easier
to reason through.
Fix#983.
0 commit comments