[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Curb the scaling
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] Curb the scaling |
Date: |
Thu, 12 Oct 2017 23:39:00 +0200 (CEST) |
>>> As per our discussion I propose the following patch to limit the
>>> outline scaling so that ppem values do not exceed 65535. As far
>>> as I can see, no such limits are currently in place, ppem values
>>> are simply truncated while the scaling factors are not limited.
>>
>> Looks good.
>
> I am hesitating with the ppem-limiting patch. It turns out that the
> fuzzer requests just 20 ppem, yet it overflows. So the glyphs
> spread far beyond the EM and FT_Face->bbox too.
As mentioned earlier, there is no chance to ever catch cumulative
values without actively comparing against a maximum value. And such a
comparison is more expensive that using ADD_LONG and friends.
> Checking for reasonable size by calling FT_Outline_Get_CBox may seem
> excessive, but we do call it twice anyway when we enter
> FT_Render_Glyph. We do not need much, a lot of overflows will be
> avoided if we only limit actual CBox to, say, 4 times EM.
Honestly spoken, this looks very artificial and arbitrary.
Werner
- [ft-devel] Curb the scaling, Alexei Podtelezhnikov, 2017/10/03
- Re: [ft-devel] Curb the scaling, Werner LEMBERG, 2017/10/04
- Re: [ft-devel] Curb the scaling, Alexei Podtelezhnikov, 2017/10/12
- Re: [ft-devel] Curb the scaling,
Werner LEMBERG <=
- Re: [ft-devel] Curb the scaling, Alexei Podtelezhnikov, 2017/10/12
- Re: [ft-devel] Curb the scaling, Werner LEMBERG, 2017/10/13
- Re: [ft-devel] Curb the scaling, Alexei Podtelezhnikov, 2017/10/13
- Re: [ft-devel] Curb the scaling, Kostya Serebryany, 2017/10/13
- Re: [ft-devel] Curb the scaling, Alexei Podtelezhnikov, 2017/10/13
- Re: [ft-devel] Curb the scaling, Werner LEMBERG, 2017/10/13