[MPEG-OTSPEC] Documentation guidance on CFF(2) transformation

Dominik Röttsches drott at google.com
Wed Jan 24 10:05:20 CET 2024


Hi Skef,

On Wed, Jan 24, 2024 at 10:54 AM Skef Iterum via mpeg-otspec <
mpeg-otspec at lists.aau.at> wrote:

> I was looking through the COLR portions of the spec and didn't find any
> guidance on applying transformations to CFF or CFF2 glyph sources, what
> with those formats various horizontal- and vertical- specific operators.
>

What do you mean by: "what with those formats various horizontal- and
vertical- specific operators."?


> Was it assumed that implementations would first unpack into some
> intermediate form, such as moveto/lineto/curveto sequences, and thus no
> further guidance was needed? (Obviously COLR does work with CFF and
> CFF2, so one assumes, or hopes, that the implementations sorted all this
> out.) Or is it more that one can just expect that implementers will
> figure this sort of thing out in general, and if so how does one decide
> what needs some guidance and what doesn't?


Are you wondering about this from a hinting perspective? A COLRv1 or COLRv0
implementing stack arrives at a situation where a glyph contour needs to be
clipped and filled. The glyph sizing is controlled by an application font
size, for example coming from CSS. And also, a local transform can exist,
from a CSS affine transform, or otherwise. Then, font internal transforms
can occur in COLRv1. I'd say the most reasonable thing is then to see if
the text is still horizontal and only uniformly scaled, extract the actual
font size after applying transforms, render at that size with hinting if
possible. If the text is rotated or non-uniformly scaled, skewed etc.
render without hinting. That's at least what I see making sense for
TrueType.

Dominik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20240124/7234e8ef/attachment.html>


More information about the mpeg-otspec mailing list