Re: Font rendering question - Brush King.otf

2023-07-17 Thread Andrew Murray
Thanks very much for your answer.

> On 16 Jul 2023, at 6:22 pm, Werner LEMBERG  wrote:
> 
> 
>> 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.  [...]
> 
>> 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?
> 
> The font is broken (it contains self-overlapping contours), however,
> this isn't an issue here.  Regardless of that, the error message is
> correct: For example, glyph 'A' in this font has more than 1 (on
> and off) points!  Stroking indeed overflows FreeType's built-in size
> guards.
> 
> On the other hand, this font is *completely* unsuitable for stroking;
> it thus doesn't bother me in any way that FreeType can't do that :-)
> 
> 
>Werner




Re: Font rendering question - Brush King.otf

2023-07-16 Thread Werner LEMBERG

> 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.  [...]

> 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?

The font is broken (it contains self-overlapping contours), however,
this isn't an issue here.  Regardless of that, the error message is
correct: For example, glyph 'A' in this font has more than 1 (on
and off) points!  Stroking indeed overflows FreeType's built-in size
guards.

On the other hand, this font is *completely* unsuitable for stroking;
it thus doesn't bother me in any way that FreeType can't do that :-)


Werner