Font rendering question - Brush King.otf
Andrew Murray <[email protected]> Sat, 15 Jul 2023 18:02:59 +1000
| Newsgroups | gmane.comp.fonts.freetype.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
Over at Python Pillow, we’ve had a user asking about https://www.dafont.com/brush-king.font. When Pillow calls FT_Glyph_Stroke on any of the letters abcdeghkmpqrvwz, FreeType returns Array_Too_Large.
Here’s some code to reproduce the matter.
```
FT_Face face = NULL;
FT_New_Face(library, "Brush King.otf", 0, &face);
FT_Stroker stroker = NULL;
FT_Stroker_New(library, &stroker);
FT_Stroker_Set(
stroker,
(FT_Fixed)64,
FT_STROKER_LINECAP_ROUND,
FT_STROKER_LINEJOIN_ROUND,
0);
FT_Load_Glyph(face, 64, FT_LOAD_NO_BITMAP);
FT_Glyph glyph;
FT_Get_Glyph(face->glyph, &glyph);
int error = FT_Glyph_Stroke(&glyph, stroker, 1);
printf("error %d\n", error);
```
So, my question - is there something I’ve done incorrectly in the above reproduction, is this a FreeType bug, or is the font simply broken?
Thanks,
Andrew Murray