-
Notifications
You must be signed in to change notification settings - Fork 659
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
[css-text] Glyph substitution #8545
Comments
Maybe |
@Crissov Thank you for this link! I searched through existing issues, but I was focussed to much on The API seems about right and the same as required for glyph substitution. The This issue is about glyph substitutions only. |
There was an earlier proposal for a property called |
The problems with the older proposal for Minutes from the link above : https://lists.w3.org/Archives/Public/www-style/2008Sep/0074.html Glyph substitution is a different feature than text replacement. Text replacement can be done by changing the text or with JavaScript. Glyph substitution is only possible in font files at this moment. I've created a small demo to illustrate text/character transforms vs. glyph substitutions. https://romainmenke.github.io/glyph-substitution-demo/text-transform-vs-glyp-substitution/ in this example I am using a simple there might be other cases/examples that illustrate the differences and happy to add any to the demo I've also updated the made up syntax at the top. |
FWIW, I've wished on a number of occasions that glyph substitution was a thing. And yes, definitely glyph substitution, not character substitution. |
I am in favor of adding glyph substitution to CSS, and I agree that it adding it to |
I’ve done this for a thesis in LaTeX a couple of years ago and was really glad it was possible there. It is a pretty niche use case though. Would you expect this to work with glyph names, which can differ quite a bit despite harmonization efforts like AGL? |
Another example : Some fonts have alternate numerals, I don't think it's possible today to have dynamic content, either from a CMS or from backend data and have numbers take on the appearance of these alternate numerals.
With glyph substitution this would be trivial. |
Recently ran into several similar issues:
Æ
, when the actual text content should have beenae
.f o
, when the actual text content should have beenfoo
.When solving this with actual character replacements we are creating problems for accessibility, SEO, how text breaks and wraps,...
Content editors also find it hard to consistently apply the "special" notation.
The alternative is to solve this in font files with glyph substitutions.
This works really well and avoids all the issues mentioned above.
But adding custom substitutions is technically complex and not always feasible depending on the font file formats. (or impossible with hosted fonts, like google fonts)
It is not something that can be easily and quickly done by a frontend/css developer.
This made me wonder if this could be solved with CSS?
Syntax might require an at rule to be able to set and reuse multiple properties.
I imagine this also makes it possible to optimize things in implementations when these substitutions are globally defined.
every name/keyword is made up, I haven't done enough reading on this to suggest meaningful naming here
The text was updated successfully, but these errors were encountered: