freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] ouch! (burned by premultiplication)


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] ouch! (burned by premultiplication)
Date: Wed, 23 May 2018 11:01:08 -0400

On Wed, May 23, 2018 at 1:35 AM, Werner LEMBERG <address@hidden> wrote:
>
>> I cannot believe it.
>> http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/sfnt/pngshim.c#n52
>>
>> Using premultiplied BGRA is a very bad decision.  [...]
>
> Well, have a look at
>
>   https://docs.microsoft.com/en-us/typography/opentype/spec/cbdt
>
>   [...] The color channels represent pre-multiplied color and are
>   encoded colors in the sRGB colorspace.  [...]

Yet in https://docs.microsoft.com/en-us/typography/opentype/spec/cpal

[...] The colors in the Color Record should *not* be pre-multiplied,
and the alpha value should be explicitly set for each palette entry.
[...]

This discrepancy begins to make sense to me. It is important to keep
original colors during composition stage, perhaps to facilitate gamma
correction. Admittedly, this is only important at the edges of high
contrast. I was hard pressed to find a glyph in NotoColorEmoji.ttf
which is visibly improved by gamma correction. I found it at glyph
index 2477, look at the merman's trident.

Can we possibly make premultiplication optional last step? It could be
a default option, but I would prefer otherwise.



reply via email to

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