<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Treat color glyph alpha as mask instead of source alpha"
href="https://bugs.freedesktop.org/show_bug.cgi?id=102661#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Treat color glyph alpha as mask instead of source alpha"
href="https://bugs.freedesktop.org/show_bug.cgi?id=102661">bug 102661</a>
from <span class="vcard"><a class="email" href="mailto:spitzak@gmail.com" title="Bill Spitzak <spitzak@gmail.com>"> <span class="fn">Bill Spitzak</span></a>
</span></b>
<pre>Cairo was designed to act like the letters were the *mask*. No pixels outside
the letters should be changed no matter what the compositing operation is or
what character is drawn.
Users expect that by default (which means the compositing op is OVER) the emoji
are filled in with their colors.
It is also useful to be able to fill the shapes of the emoji with solid colors,
for effects such as drop shadows. This cannot be done in one step right now.
My recommendation:
* If the op is OVER, then it does what it is doing now.
* If the op is not OVER, then the color of the emoji is ignored. Instead the
alpha of each of them is merged into the mask with the rest of the glyphs, and
then font rendering continues as normal. In particular this allows SOURCE to be
used to fill with a solid color or image.
A different recommendation. This is more consistent, but much harder to
implement, and may be less useful. To draw an emoji produce exactly the same
result as if you did this:
* Intersect the mask with the alpha of the emoji
* Set the source to an opaque *unpremultiplied* version of the emoji's color
* Fill a rectangle that is bigger than the mask.
This produces the same result for OVER as it does now. SOURCE also produces the
same result.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>