freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Regarding head-table Bit 3: Force ppem to integer values


From: Behdad Esfahbod
Subject: Re: [ft-devel] Regarding head-table Bit 3: Force ppem to integer values for all internal scaler math
Date: Tue, 09 Dec 2014 11:04:41 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 14-12-02 04:25 PM, Behdad Esfahbod wrote:
> On 14-11-26 08:58 PM, Werner LEMBERG wrote:
>>
>>> Essentially it's about whether FreeType should respect bit 3 of
>>> head-table flags:
>>>
>>>   http://www.microsoft.com/typography/otspec/head.htm
>>>
>>> and implemented here:
>>>
>>>   https://github.com/behdad/freetype/blob/master/src/truetype/ttobjs.c#L1189
>>>
>>> I don't think applying this rounding makes sense when not doing
>>> bytecode hinting.  Indeed, it breaks linear scaling, etc.
>>
>> Sounds sensible to disable it for the non-hinting case.  Can you
>> prepare a patch?
> 
> Ouch, wouldn't work, as the face metrics are independent of load flags :(.
> 
> Not sure how to proceed, short of reverting the commit from 2011.  Or perhaps
> disable the current behavior if TT_USE_BYTECODE_INTERPRETER is not set.  But
> that would result in even harder-to-debug situations...

Doug also found this comment in the declaration of TT_SizeRec_:

    /* we have our own copy of metrics so that we can modify */
    /* it without affecting auto-hinting (when used)         */

which suggests that root metrics were intentionally not copied from this
(which was changed in the commit in 2011).

That said, neither way works, because on the one hand we don't expect clients
to check font type and hinter settings to figure out which set of metrics to
access.  On the other hand, whichever ends in the root metrics will be right
for one setting and wrong for another.  The root of the problem is that load
flags are a glyph load time property, not a font-wide.

-- 
behdad
http://behdad.org/



reply via email to

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