<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoPlainText">Georg:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">To discuss what might be feasible, I think we really need a better understanding of what set of problems might be solved. There has to be some limit to the functionality—we can’t provide Illustrator in a TTF—and I think to be feasible
any additional capabilities would need to be very minimal. The original use case that made colour fonts a reality was emoji, and I think none of this is needed for emoji. But this question really pertains to text faces. What are the kinds of effects
<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">You've given one example, with letters that have a 3D extruded appearance, with the bodies of the letters not overlapping, but each having a layer for a shadow that extends (at least for some glyphs) beyond the left side bearing. Of
course, the shadows could have gone to the right (virtual light source on the left), in which case the problem might not occur at all (at least for some implementations) because of how rendering is done. Note that the problem, in the most general case, isn't
limited to colour fonts, but can also arise for achromatic fonts if adjacent glyphs overlap and are styled with different colours. Here's an example using Calibri with letter spacing condensed to create overlap:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:48.0pt;color:red">A</span><span lang="EN-CA" style="font-size:48.0pt">B<span style="color:red">C</span>D<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="font-size:48.0pt;color:red;letter-spacing:-10.0pt">A</span><span lang="EN-CA" style="font-size:48.0pt;letter-spacing:-10.0pt">B<span style="color:red">C</span></span><span lang="EN-CA" style="font-size:48.0pt">D<o:p></o:p></span></p>
<p class="MsoPlainText">Here’s a screenshot of how this appears in my mail agent:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><img width="192" height="168" style="width:2.0in;height:1.75in" id="Picture_x0020_1" src="cid:image001.png@01D6E41A.768FDA70"><o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Now, each glyph overlaps on top of the glyph on its left. Someone might say, “Oh, but I want them to layer the opposite way.” That doesn’t imply there’s a compelling business case for text layout engines to add an option to control how
overlapping glyphs layer. <o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I do understand that this non-colour font example isn’t entirely applicable to colour fonts, but it raises a valid question: how much machinery does it make sense to add, and what is an appropriate threshold of diminishing returns.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Btw, I mentioned the <a href="https://www.fontspace.com/use-your-imagination-font-f43274">
Use Your Imagination</a> font, which has overlapping glyphs that have some transparency and so blend with simple alpha blending. If you look at the examples or try it out, you’ll notice the same right-over-left layering of adjacent glyphs, which is manifested
by the drop-shadow effect (a transparent black layer). The shadow effect used in this font didn’t require any additional data in the font. (That font was implemented using OT-SVG, but could just as well have been implemented using COLR v0.)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Your suggestion below sounds relatively simple, but I’m not sure it’s as simple as it seems. First, there’s the question of what additional data is needed to describe layer groups. As I mentioned earlier, this wouldn’t be difficult for
COLR v0 colour glyphs, but for COLR v1 the notion of layer is not so simple. Then there’s a question of what controls for blending of corresponding layer groups from adjacent glyphs should be provided: would only simple alpha blending be sufficient? Without
example use cases, how do we decide that?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Then, there’s the implication for text rendering engines: it implies that engines must render all colour glyphs in each line in three separate passes: layer groups 0 for all glyphs in the line, then layer groups 1, then layer groups
2. Is that additional complexity in rendering implementations worth it? I think more business justification would be needed to convince implementers.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Peter<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">-----Original Message-----<o:p></o:p></p>
<p class="MsoPlainText">From: Georg Seifert <<a href="mailto:typogeorg@gmail.com">typogeorg@gmail.com</a>>
<o:p></o:p></p>
<p class="MsoPlainText">Sent: Wednesday, January 6, 2021 9:55 AM<o:p></o:p></p>
<p class="MsoPlainText">To: Laurence Penney <<a href="mailto:lorp@lorp.org">lorp@lorp.org</a>><o:p></o:p></p>
<p class="MsoPlainText">Cc: Peter Constable <<a href="mailto:pgcon6@msn.com">pgcon6@msn.com</a>>; MPEG OT Spec list <<a href="mailto:mpeg-otspec@lists.aau.at">mpeg-otspec@lists.aau.at</a>><o:p></o:p></p>
<p class="MsoPlainText">Subject: Re: [MPEG-OTSPEC] WD for AMD 2 and COLR v1 enhancements<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">I don’t think we need to have control for M x N layers. Assigning a layer group ID would be sufficient. And I don’t think in most cases we need more than three groups (e.g. background/shadow, body, highlights; and in most cases body
and highlights can be drawn together). This will not add much complexity. Draw all layers from each group for all glyph in the text box. I don’t think special control for blending between glyphs is needed, just draw then as it is now.<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">so instead of drawing:<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> A.layer0, A.layer1, A.layer2, B.layer0, B.layer1, B.layer2
<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">we do (assuming that layer0 and layer1 are in one group):<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"> A.layer0, A.layer1, B.layer0, B.layer1, A.layer2, B.layer2<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Georg<o:p></o:p></p>
</div>
</body>
</html>