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-text-decor] Control the line height of text containing emphasis marks #11257

Open
xfq opened this issue Nov 21, 2024 · 2 comments
Open

[css-text-decor] Control the line height of text containing emphasis marks #11257

xfq opened this issue Nov 21, 2024 · 2 comments
Labels
css-text-decor-3 Current Work css-text-decor-4 i18n-clreq Chinese language enablement i18n-jlreq Japanese language enablement i18n-klreq Korean language enablement i18n-mlreq Mongolian language enablement i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response.

Comments

@xfq
Copy link
Member

xfq commented Nov 21, 2024

Many fonts (most Simplified/Traditional Chinese fonts and quite a few Japanese fonts) tend to increase line height when using text-emphasis-style, which usually leads to undesirable results.

To address this issue, we may need a new CSS property to:

  1. force the browser to select a font that displays emphasis marks correctly without widening line spacing, and/or
  2. manage the spacing/proximity of the emphasis marks alongside the text (kind of like text-underline-offset)

I'm not sure if font formats can offer information about the appropriate position of emphasis marks. If so, the UA should use such font-based information when available.

Currently, we already have this text in CSS Text Decoration:

the UA may opt to use a font known to be good for emphasis marks, or the marks may instead be synthesized by the UA.

However, this is insufficient because it is only a MAY, and there is no way for authors to enforce the behavior.

See more background information in w3c/jlreq#446

/cc @bobbytung

@xfq xfq added css-text-decor-3 Current Work css-text-decor-4 i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. i18n-jlreq Japanese language enablement i18n-clreq Chinese language enablement i18n-klreq Korean language enablement i18n-mlreq Mongolian language enablement labels Nov 21, 2024
@xfq
Copy link
Member Author

xfq commented Dec 17, 2024

@xfq
Copy link
Member Author

xfq commented Dec 17, 2024

Discussed in 17 December 2024 I18N ⇔ CSS call: https://www.w3.org/2024/12/17-i18n-minutes.html#1ddf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-text-decor-3 Current Work css-text-decor-4 i18n-clreq Chinese language enablement i18n-jlreq Japanese language enablement i18n-klreq Korean language enablement i18n-mlreq Mongolian language enablement 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

1 participant