[csswg-drafts] [css-text-decor] Informal Western text emphasis and arbitrary marks (#13284)

Crissov has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text-decor] Informal Western text emphasis and arbitrary marks ==
[Emphasis marks](https://drafts.csswg.org/css-text-decor-4/#emphasis-marks) are currently tailored to sinographic scripts, and rightfully so. However, there are also some – mostly informal, handwritten – traditions within eurographic scripts (and probably others) to mark individual characters for emphasis, e.g. in personal letters and invitation cards. Those marks tend to be closer incorporated with the glyphs, which could seem to place them in the domain of fonts, particularly stylistic variants and alternates, but those alterations can be defined (and should be applicable) independent of features the font implements.

To support these styles, `text-emphasis-position` would need several additional, non-exclusive values:

- [`counter`](https://en.wikipedia.org/wiki/Counter_(typography)) for whitespace fully enclosed by the glyph outlines, prototypically within the letter _o_ (and its equivalents in Cyrillic and Greek)
  - the partial values `filled` and `open` of the `text-emphasis-style` property determine whether the solid emphasis mark is drawn separately within the counter or the counter itself becomes the hollow part of the mark
  - for characters with multiple counters, e.g. _B & 8_, all should be affected by default, but the classic position values could be reused to limit this, i.e. `above` would be the upper counter and `below` the lower
- [`tittle`](https://en.wikipedia.org/wiki/Tittle) for diacritic dots which are non-essential, i.e. would get replaced by an eventual accent mark, particularly atop Latin _i_ and _j_
  - possibly could also cover either hamza or ʾiʿǧām dots in Arabic or dagesh in Hebrew etc.
  - the emphasis mark substitutes the tittle
- `dot` for `tittle` and any dot in punctuation marks like `.?!;:` or in diacritic marks like umlaut / trema `ö`
- `diacritic` or `accent` for marks added to a base letter
  - the emphasis mark replaces any diacritic mark, even if both are part of the same precomposed character and even if there are multiple ones stacked
  - if the diacritic mark consists of separate parts like the two dots in a diaeresis, they should still be substituted collectively (unlike for `dot`)
- `inside` shorthand for both `counter` and `tittle` since they rarely occur together, treated as `top` in scripts neither applies

The most common monochrome emphasis marks encountered in informal texts, which should inform new values for the `text-emphasis-style` property, include:

- ⭐️ five-spoked stars, less often pentagrams and six-spoked stars
- 💟 hearts
- 🙂 smiley faces, also frownies
- ☀️ sun
- 🔆🌟💢 rays – different and more complex than sun because they should surround their scope, in particular they would better apply to _bowls_ than _counters_, therefore minor priority
- ✨ sparkles – same caveat as rays

Instead of new style keywords, [`<basic-shape>`](https://drafts.csswg.org/css-shapes-1/#basic-shape-functions) could be added as a value. Its reference box would be the minimum rectangle of the mark or counter to replace for the proposed position keywords, so differ for each glyph, and something arbitrary / ruby-based for the existing positions. 

----
Since these decorations are neither available as [combining characters](https://www.unicode.org/charts/PDF/U20D0.pdf) (including variation selectors) nor within precomposed letters in Unicode, (`@`)`text-transform` could not handle them. There are few exceptions for punctuation marks as [_dingbats_](https://en.wikipedia.org/wiki/Dingbats_(Unicode_block)), e.g. a heart-shaped exclamation mark at U+2763 ❣.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13284 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 31 December 2025 14:48:46 UTC