w3c / w3c/csswg-drafts

[css-fonts] Display gaiji as text if glyphs are supported

Open
#4,013 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

css-fonts-4 i18n-tracker
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Authors (particularly in east-asian languages) tend to use images to represent rare and uncommon characters. These images are commonly called gaiji images. Use of gaiji in content causes several problems which include:

  • Image may look blurry at larger font sizes
  • Alignment of image baseline with the text baseline
  • Font in image may not match the base text

Authors don't trust all browsers and readers to represent these glyphs correctly, so even though it may work in one application they will continue to use the image as long as the lowest common denominator does not support the glyph.

In order to break this deadlock, a property could be added that allows for a UA to display the alt-text of an image if those glyphs are supported by the UA. If the glyphs are not supported, the UA will display the image as normal.

Currently, it seems an appropriate place to add this could be as a new keyword to "content".

https://www.w3.org/TR/css-content-3/#content-property

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the CSS Content Level 3 content-property section linked in the issue, then review the five-comment discussion for existing constraints. Define the proposed keyword's syntax and fallback behavior for gaiji images, and consider the specification changes needed to make the behavior implementable and testable.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.