Closed
Description
Currently, font-variant: small-caps
is implemented with synthesized small caps: transform the text to upper case and use a smaller font size. gfx::font::glyph_index
contains code like codepoint.to_uppercase().next().unwrap()
to find the upper case of a single code point. .next().unwrap()
takes the first char
in the iterator returned by char::to_uppercase
and drops the rest.
This is OK at the moment since the iterator always of length 1. But in the future, it will do complex case mapping and may yield more than one char, and the rest should not be dropped. See #23126
The small-caps implementation should probably use str::to_uppercase
earlier in the code, before considering individual char
s.
Metadata
Metadata
Assignees
Labels
No labels