On Wed, May 23, 2018 at 1:35 AM, Werner LEMBERG <[email protected]> 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. _______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
