[MPEG-OTSPEC] WD for AMD 2 and COLR v1 enhancements

Peter Constable pgcon6 at msn.com
Mon Jan 11 18:35:32 CET 2021


Chris:

The font is freely available, here:

Use Your Imagination<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fontspace.com%2Fuse-your-imagination-font-f43274&data=04%7C01%7C%7C46d6314259554466a52508d8b640e0ff%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637459737064867064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=n42U%2FHdxdcCWz41Uh%2BV1R86jQO5YVxzWoRbuE2tO9%2FY%3D&reserved=0>

From: mpeg-otspec <mpeg-otspec-bounces at lists.aau.at> On Behalf Of Chris Lilley
Sent: Monday, January 11, 2021 6:55 AM
To: mpeg-otspec at lists.aau.at
Subject: Re: [MPEG-OTSPEC] WD for AMD 2 and COLR v1 enhancements


Thanks, Peter.

The Arabic example was added after discussion with the W3C I18n Core Working Group. In this case, the expectation is that the entire connected glyph sequence was drawn with one stroke, and thus opacity can show up unexpected joins that would be hidden with a fully opaque rendering.

But your nice example clearly shows a case where the expectation is that each glyph is a separate, semi-transparent object, they glyphs have graffiti-like overlap and the rendering should reflect this.

Which means I probably need to update CSS Color 4 to address both cases, and to point out that one size does not fit all cases.

Is the font you used freely available? If not, could I use your graphic (with attribution)?
On 2021-01-09 05:30, Peter Constable wrote:
While reading the CSS Color Module Level 4 draft<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FTR%2Fcss-color-4%2F&data=04%7C01%7C%7C46d6314259554466a52508d8b640e0ff%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637459737064867064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Z9L%2FpXFWdWjtJ2Bfq2hep1vrd%2B6JauqVkdNJhZNJ4uo%3D&reserved=0>, a related complication was brought to mind by figure 11:

[cid:image004.png at 01D6E7FD.1A033BD0]

If two elements of a composition overlap and have alpha < 1, their alphas would combine. What figure 11 is showing is a case in which the alpha is applied to the text as a whole (the containing text element). But it brings to mind an issue for color fonts if glyphs are overlapping: In the case of a font like Use Your Imagination, the colour glyphs' layers have alpha < 1, the glyphs intentionally overlap, and the expectation is that the alphas in the overlapping regions combine. E.g.,

[cid:image002.png at 01D6E7FD.19FA1410]


But one could imaging a different colour font for a cursively connected face in which overlapping glyphs have connections with fills of the same colour and alpha, and with the intent that the alphas do not combine but that the overlapping regions are intended to display with the same alpha as the stroke from each glyph would have-as in figure 11 above.


The main point here is to point out one more way in trying to control compositional interactions between adjacent colour glyphs is non trivial, and a single example isn't a sufficient representation of usage scenarios.


Peter

From: Vladimir Levantovsky <vladimir.levantovsky at gmail.com><mailto:vladimir.levantovsky at gmail.com>
Sent: Wednesday, January 6, 2021 2:23 PM
To: 'Peter Constable' <pgcon6 at msn.com><mailto:pgcon6 at msn.com>; 'Georg Seifert' <typogeorg at gmail.com><mailto:typogeorg at gmail.com>; 'Laurence Penney' <lorp at lorp.org><mailto:lorp at lorp.org>
Cc: 'MPEG OT Spec list' <mpeg-otspec at lists.aau.at><mailto:mpeg-otspec at lists.aau.at>
Subject: RE: [MPEG-OTSPEC] WD for AMD 2 and COLR v1 enhancements

> Your suggestion below sounds relatively simple, but I'm not sure it's as simple as it seems.

+1!
I don't think it's simple. If we assume it's implemented ...

  1.  the number of layer groups can't be prescribed, it would be up to a font developer to decide. We may think we do not need more than three layer groups but it's not up to us to decide;
  2.  we cannot assume to know the "meaning" of the layer group. Something simple, like e.g. "background" or "drop shadow" may seem straightforward, but like Peter said, even that can be problematic because shadow directions cast from a virtual light source would affect rendering results based on direction;
  3.  even if we think it's ok to allow overlaps between glyphs in the same layer group - the overlaps of translucent background layers may still need blending;
  4.  applications would have to completely change their text rendering pipeline, starting with the need to determine a number of layer groups from the font [possibly, per glyph]. Combining different glyph ranges on page may require different number of rendering layers (e.g. color + monochrome glyphs on the same line of text), multiple layers need to be rendered, and it would have to be redone every time there are any viewport / layout / spacing / scale changes ...
  5.  in my opinion, any proposed change that affects how applications interact with fonts is a non-starter.

Thanks,
Vlad


From: mpeg-otspec [mailto:mpeg-otspec-bounces at lists.aau.at] On Behalf Of Peter Constable
Sent: Wednesday, January 6, 2021 2:35 PM
To: Georg Seifert <typogeorg at gmail.com<mailto:typogeorg at gmail.com>>; Laurence Penney <lorp at lorp.org<mailto:lorp at lorp.org>>
Cc: MPEG OT Spec list <mpeg-otspec at lists.aau.at<mailto:mpeg-otspec at lists.aau.at>>
Subject: Re: [MPEG-OTSPEC] WD for AMD 2 and COLR v1 enhancements


Georg:



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



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:


ABCD
ABCD

Here's a screenshot of how this appears in my mail agent:



[cid:image003.png at 01D6E7FD.19FA1410]



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.



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.



Btw, I mentioned the Use Your Imagination<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.fontspace.com%2Fuse-your-imagination-font-f43274&data=04%7C01%7C%7C46d6314259554466a52508d8b640e0ff%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637459737064867064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=n42U%2FHdxdcCWz41Uh%2BV1R86jQO5YVxzWoRbuE2tO9%2FY%3D&reserved=0> 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.)



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?



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.







Peter





-----Original Message-----

From: Georg Seifert <typogeorg at gmail.com<mailto:typogeorg at gmail.com>>

Sent: Wednesday, January 6, 2021 9:55 AM

To: Laurence Penney <lorp at lorp.org<mailto:lorp at lorp.org>>

Cc: Peter Constable <pgcon6 at msn.com<mailto:pgcon6 at msn.com>>; MPEG OT Spec list <mpeg-otspec at lists.aau.at<mailto:mpeg-otspec at lists.aau.at>>

Subject: Re: [MPEG-OTSPEC] WD for AMD 2 and COLR v1 enhancements



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.



so instead of drawing:



    A.layer0, A.layer1, A.layer2, B.layer0, B.layer1, B.layer2



we do (assuming that layer0 and layer1 are in one group):



    A.layer0, A.layer1, B.layer0, B.layer1, A.layer2, B.layer2



Georg



_______________________________________________

mpeg-otspec mailing list

mpeg-otspec at lists.aau.at<mailto:mpeg-otspec at lists.aau.at>

https://lists.aau.at/mailman/listinfo/mpeg-otspec<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.aau.at%2Fmailman%2Flistinfo%2Fmpeg-otspec&data=04%7C01%7C%7C46d6314259554466a52508d8b640e0ff%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637459737064877059%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FKFR9iz4Wq0rja9skicMzbIQg5F98oxb9b2Evx3oVXQ%3D&reserved=0>

--

Chris Lilley

@svgeesus

Technical Director @ W3C

W3C Strategy Team, Core Web Design

W3C Architecture & Technology Team, Core Web & Media
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20210111/7d53b0d2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 160708 bytes
Desc: image002.png
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20210111/7d53b0d2/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 6225 bytes
Desc: image003.png
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20210111/7d53b0d2/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 69775 bytes
Desc: image004.png
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20210111/7d53b0d2/attachment-0005.png>


More information about the mpeg-otspec mailing list