Skip to content

[fill-stroke] Standardized text-stroke behavior in COLR table fonts #6815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yisibl opened this issue Nov 13, 2021 · 4 comments
Open

[fill-stroke] Standardized text-stroke behavior in COLR table fonts #6815

yisibl opened this issue Nov 13, 2021 · 4 comments

Comments

@yisibl
Copy link
Contributor

yisibl commented Nov 13, 2021

The -webkit-text-stroke property is currently implemented in all major browsers, browsers behave differently when encountering COLRv0 format fonts.

image

Safari can add strokes to COLRv0 format fonts, but Firefox and Chrome do not, and the COLRv0 format is so widely used today that we need to standardize it to avoid compatibility differences. Test case

image
Chrome vs Firefox-colr font

@litherum says:

Safari’s behavior seems more correct than Firefox’s to me. Do you prefer Firefox’s rendering?
https://twitter.com/Litherum/status/1459233815256125445

With the COLRv1 format coming to OpenType 1.9 and released in Chrome, we also need to clarify how this property interacts with SVG tables and COLRv1.

@drott @jfkthame

@yisibl yisibl changed the title Standardized text-stroke behavior in COLR table fonts [fill-stroke] Standardized text-stroke behavior in COLR table fonts Nov 13, 2021
@yisibl
Copy link
Contributor Author

yisibl commented Nov 13, 2021

#4795

@litherum
Copy link
Contributor

The content said "please stroke this text" so we're stroking the text. That seems natural to me...

@jfkthame
Copy link
Contributor

The content said "please stroke this text" so we're stroking the text. That seems natural to me...

I'm not entirely convinced this is a good idea.... it's clear enough what "stroking the text" means when dealing with monochrome glyphs (just stroke the glyph outline instead of filling it), but it's much less clear how to "stroke" a full-color image. Stroking the outline of each individual colored region may sometimes work OK, if the glyph is not overly complex, but it will often result in an incomprehensible mess.

(What do you do with bitmap glyphs when the content says "please stroke this text"?)

@jfkthame
Copy link
Contributor

Another point of view might be that COLR glyphs are often not really "text" as people would traditionally understand it; they're often (most often, maybe?) used for inline images. The fact that we use Unicode codepoints and OpenType font technology to conveniently encode, deliver and render these images is an implementation detail, but conceptually 🎃 or 🦃 or 🎅 is an image, and the request "please stroke this text" isn't applicable to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants