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

Vladimir Levantovsky vladimir.levantovsky at gmail.com
Wed Jan 6 23:22:51 CET 2021


> 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 …

-          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;

-          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;

-          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;

-          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 … 

-          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>; Laurence Penney <lorp at lorp.org>
Cc: MPEG OT Spec list <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:

 



 

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://www.fontspace.com/use-your-imagination-font-f43274>  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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20210106/4c7aee0b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6225 bytes
Desc: not available
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20210106/4c7aee0b/attachment-0001.png>


More information about the mpeg-otspec mailing list