You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 chars.
The text was updated successfully, but these errors were encountered:
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 likecodepoint.to_uppercase().next().unwrap()
to find the upper case of a single code point..next().unwrap()
takes the firstchar
in the iterator returned bychar::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 individualchar
s.The text was updated successfully, but these errors were encountered: