monks/font_size_adjust
The font-size-adjust CSS property provides a way to modify the size of lowercase letters relative to the size of uppercase letters, which defines the overall {{cssxref(“font-size”)}}. This property is useful for situations where font fallback can occur.
Legibility can become an issue when the first-choice {{ Cssxref(“font-family”) }} is unavailable and its replacement fallback font has a significantly different aspect value (height of lowercase letters divided by font size). Legibility of fonts, especially at small font sizes, is determined more by the size of lowercase letters than by the size of uppercase letters. The font-size-adjust property is useful for adjusting the font size of fallback fonts to keep the aspect value across fonts consistent, ensuring that the text appears similar regardless of the font used.
Values
pub const cap_height: #(String, String)
- : Uses the ratio of cap-height (height of uppercase letters) to font size to adjust fallback font size. This keyword value is used to normalize uppercase letters across fonts.
pub const ch_width: #(String, String)
- : Uses the ratio of the advance width (horizontal space taken up by a character in a font) of the character "0" (ZERO, U+0030) to font size. This keyword value is used to normalize horizontal narrow pitch of fonts.
pub const ex_height: #(String, String)
- : Uses the ratio of x-height (height of lowercase "x" in a font) to font size (aspect value) to adjust the fallback font size. This keyword value is used to normalize lowercase letters across fonts.
pub const from_font: #(String, String)
- : Uses the
<number>value for the specified<font-metric>from the first available font.
pub const ic_height: #(String, String)
- : Uses the ratio of the advance height (vertical space taken up by a character in a font) of the character "水" (CJK water ideograph, U+6C34) to font size. This keyword value is used to normalize vertical wide pitch of fonts, particularly those that include CJK characters.
pub const ic_width: #(String, String)
- : Uses the ratio of the advance width of the character "水" (CJK water ideograph, U+6C34) to font size. This keyword value is used to normalize horizontal wide pitch of fonts, particularly those that include CJK (Chinese, Japanese, Korean) characters.
pub const none: #(String, String)
- : No adjustment is applied to the
font-sizevalue for the fallback font.
pub fn raw(value: String) -> #(String, String)
Enter a raw string value for font-size-adjust
pub const revert_layer: #(String, String)