Skip to content

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

@fantasai

Description

@fantasai

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. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    css-fonts-5css-inline-3Current Worki18n-afrlreqAfrican language enablementi18n-alreqArabic language enablementi18n-amlreqAmericas Language Enablementi18n-clreqChinese language enablementi18n-elreqEthiopic language enablementi18n-eurlreqEuropean language enablementi18n-hlreqHebrew language enablementi18n-ilreqIndic language enablementi18n-jlreqJapanese language enablementi18n-klreqKorean language enablementi18n-mlreqMongolian language enablementi18n-sealreqSoutheast Asian language enablementi18n-tlreqTibetan language enablementi18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

    Type

    No type

    Projects

    Status

    Thursday morning

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions