8000 [css-fonts] Propose adding lang as a font-face descriptor · Issue #1744 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-fonts] Propose adding lang as a font-face descriptor #1744

@kahsieh

Description

@kahsieh

See https://drafts.csswg.org/css-fonts-3/#at-font-face-rule

Per the discussion in #1736, we note that generic fonts typically map to more than one system font with lang affecting the resultant font. Adding lang as a @font-face descriptor might be useful for similar reasons, for example with CJK:

  • CJK have partially intersecting character sets, so unicode-range alone cannot specify fonts for each language. This can be an issue on pages containing text in more than one lang.
  • Even if a single font (or @font-face) contains faces for all the characters in some text, that font may not be for the correct lang everywhere. (A single codepoint can map to different variant glyphs depending on lang, and this is reflected in fonts.)

This addition would allow fonts to resolve lang-appropriately when a font family specified with @font-face is applied to a page with multiple langs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0