freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] (no subject)


From: Werner LEMBERG
Subject: Re: [ft-devel] (no subject)
Date: Wed, 23 Apr 2014 14:22:32 +0200 (CEST)

[Please always write to one of the FreeType mailing lists so that we
have a broader audience.]

> Why does the table 'maxp' only specify *maxComponentElements *and
> *maxComponentDepth* ?  Doesn't the 'number of components in the 2nd
> level' matter the memory pre-allocation?

My mistake, sorry.  I meant

  maxCompositePoints
    Maximum points in a composite glyph.
  maxCompositeContours
    Maximum contours in a composite glyph.

> What if the 2nd level (if any) has more components then the top
> level (Wouldn't this happen)?

This doesn't matter.

> Currently my 'composite glyph parsing process' is as follow:
> Allocate two arrays -- outlinePoints[maxCompositePoints] and
> endPtOfContours[maxCompositeContours].  Each time I visit a child
> simple glyph of current composite glyph, I'll append the outline
> points and end points of contours of the simple glyph to those two
> arrays.

Exactly.

> But those two fields -- *maxComponentElements *and
> *maxComponentDepth* -- don't even exist in this process.

You are free to ignore them if your algorithm doesn't need those
values; for example, FreeType doesn't use `maxComponentElements'.
However, `maxComponentDepth' is useful to limit the recursion depth in
case of buggy fonts.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]