[HarfBuzz] HB_CLOSURE_MAX_STAGES (was: harfbuzz: Branch 'master')

Behdad Esfahbod behdad at behdad.org
Sat Aug 4 01:59:14 UTC 2018


On Thu, Aug 2, 2018 at 12:46 AM, Richard Wordingham <
richard.wordingham at ntlworld.com> wrote:

> On Wed, 1 Aug 2018 17:31:06 -0700
> Behdad Esfahbod <behdad at behdad.org> wrote:
>
> > On Mon, Jul 30, 2018 at 6:21 PM, Richard Wordingham <
> > richard.wordingham at ntlworld.com> wrote:
> >
> > > On Mon, 30 Jul 2018 17:04:42 -0700
> > > Behdad Esfahbod <behdad at behdad.org> wrote:
>
> > > > It's impossible to hit that limit...  Ok, it would be impossible
> > > > if we increase it to 32.  I'll do that.
>
> > > That'll probably work, but I'm now intrigued.  Why have a limit that
> > > will never be hit?  Are you just catering for HarfBuzz's logic
> > > simply going badly wrong in very unusual circumstances?
>
> > Yes, simply as defense against malicious fonts and how the subsetter's
> > glyph-closure routine can be tricked to collect (way) more glyphs than
> > shaper can actually reach.
>
> But if the limit is never hit, then the defence is never used, and so
> it may as well not be there.  Or is it meant to initimidate
> designers of malicious fonts who study Harfbuzz?
>

The limit is never hit **during shaping**.  But our current glyph_closure()
can get tricked by malicious fonts without this limit. Hence the limit.



-- 
behdad
http://behdad.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20180803/84b6afae/attachment.html>


More information about the HarfBuzz mailing list