[Top][All Lists]

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

Re: [ft-devel] max_instructions in ttfautohint

From: Werner LEMBERG
Subject: Re: [ft-devel] max_instructions in ttfautohint
Date: Mon, 08 Jun 2015 12:37:09 +0200 (CEST)

> When ttfautohint recalculates the maxp values, it also includes the
> size of the fpgm and prep instructions in the maxSizeOfInstructions
> value.
> However, the Apple's TrueType Reference Manual says that only
> "instructions associated with a particular glyph" should be included
> in the computation.
> Similarly, in Microsoft's OpenType spec its says the value is the
> "maximum byte count for glyph instructions”.
> When analysing a font produced by ttfautohint using Microsoft
> FontValidator, the latter raises the following warning (W1900):
>> maxp: The value doesn't match the calculated value
>> The maxSizeOfInstructions value should be based on the largest set
>> of instructions (in the glyf table) for a single simple or
>> composite glyph.  The maxStackElements value should similarly be
>> based on the largest value for a single simple or composite
>> glyph. The length and content of the fpgm and prep tables, used
>> font-wide, are not relevent when specifying these values.
> It is curious because even fonts produced with VTT, another Microsoft
> tool, seems to go against the spec by also including fpgm and prep
> when recalculating the maxp's maxSizeOfInstructions.
> Therefore I'm wondering what the correct value should be?

Honestly, I don't know.  I simply go the safer route by specifying a
larger value.  I suggest to ask this question on the OpenType mailing
list, where all the companies' font experts are chatting.  However, my
gut feeling is that it doesn't matter today, and we can simply ignore
the warning.

Regarding FontValidator: The binary available from the MS typography
site is sooo old (at least it was the last time I looked).  Maybe you
could also urge MS to make an updated version available, which is
certainly already used internally at MS.


reply via email to

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