Skip to content
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-fonts-5][css-inline-3] Text Edge Metrics Registry #11384

Open
fantasai opened this issue Dec 16, 2024 · 1 comment
Open

[css-fonts-5][css-inline-3] Text Edge Metrics Registry #11384

fantasai opened this issue Dec 16, 2024 · 1 comment
Labels
Agenda+ i18n Add to agenda for CSS-i18n calls css-fonts-5 css-inline-3 Current Work i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.

Comments

@fantasai
Copy link
Collaborator

fantasai commented Dec 16, 2024

One of the known issues with the text-box-trim property, the initial-letter property, and font-size-adjust, is that we only have metrics for Western and CJK writing systems. To the extent that these happen to correspond to the metrics for other scripts for a given font, authors can use them for other writing systems as well; but the correspondence is not guaranteed. For example, depending on the font, Hebrew's top edge sometimes coincides with the cap height, sometimes the ex height, and sometimes partway in between.

We need to support metrics for all writing systems. And to do that, we need to identify what's missing.

As I mentioned in #5244, I think we need a registry; but until we have one set up, I suggest we collect the information here. Specifically, the information we need for each writing system (ideally from actual graphic designers and typographers) is:

  • Name of the script
  • Name of top-edge metrics used for alignment and spacing (as known by typographers and calligraphers).
  • Name of bottom-edge metrics used for alignment and spacing (same)
  • Whether or not these metrics always correspond to the Latin cap-height/ex-height/baseline or CJK ideographic top/bottom when designed into the same font as Latin or CJK glyphs.
  • If the answer isn't always, design samples (ideally from multiple fonts with differing metrics) showing:
    • a mixture of Latin glyphs and the script's own glyphs (and optionally also CJK glyphs, if relevant and available) from the same font for comparison
    • text wrapped and optically aligned within a rectangular colored box
    • text optically centered against a rectangular colored box
    • text optically top-aligned to a rectangular colored box
    • text optically bottom-aligned to a rectangular colored box
  • Optionally: List of other scripts to which this script's metrics typographically correspond. (For example, the height of Greek capital letters basically always correspond to the height of Latin capital letters.)
  • Optionally: Ideas on how to figure out the top/bottom edge metrics if they're missing, whether by calculating from existing metrics or by measuring certain glyphs... (For example, CSS suggests a missing ex metric fall back to either 0.5em or a measurement of the letter 'o'.)
  • If not a member of the CSSWG, permission to include this information in a future W3C technical report. :)
@fantasai fantasai added css-inline-3 Current Work i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. css-fonts-5 Agenda+ i18n Add to agenda for CSS-i18n calls labels Dec 16, 2024
@56789KD
Copy link

56789KD commented Dec 28, 2024

Issue a change view comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda+ i18n Add to agenda for CSS-i18n calls css-fonts-5 css-inline-3 Current Work i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.
Projects
None yet
Development

No branches or pull requests

2 participants