Module font

Source
Expand description

Specified values for font properties

Re-exportsยง

pub use crate::values::computed::font::FontLanguageOverride;

Macrosยง

system_font_methods ๐Ÿ”’

Structsยง

FontPalette
Allows authors to choose a palette from those supported by a color font (and potentially @font-palette-values overrides).
FontVariantAlternates
List of Variant Alternates
FontVariantEastAsian
Variants for east asian variant
FontVariantLigatures
Variants of ligatures
FontVariantNumeric
Variants of numeric values
KeywordInfo
Additional information for keyword-derived font sizes.
MozScriptMinSize
Specifies the minimum font size allowed due to changes in scriptlevel. Ref: https://wiki.mozilla.org/MathML:mstyle
MozScriptSizeMultiplier
Specifies the multiplier to be used to adjust font size due to changes in scriptlevel.
QueryFontMetricsFlags
Flags for the query_font_metrics() function.
VariantAlternatesParsingFlags ๐Ÿ”’
Flags of variant alternates in bit
XLang
Internal property that reflects the lang attribute

Enumsยง

AbsoluteFontWeight
An absolute font-weight value for a @font-face rule.
FontFamily
Specifies a prioritized list of font family names or generic family names.
FontSize
A specified font-size value
FontSizeAdjustFactor
A factor for one of the font-size-adjust metrics, which may be either a number or the from-font keyword.
FontSizeKeyword
CSS font keywords
FontStretch
A value for the font-stretch property.
FontStretchKeyword
A keyword value for font-stretch.
FontStyle
The specified value of the font-style property.
FontSynthesis
A value for any of the font-synthesis-{weight,small-caps,position} properties.
FontSynthesisStyle
A value for the font-synthesis-style property.
FontWeight
A specified font-weight value.
MathDepth
A value for the math-depth property. https://mathml-refresh.github.io/mathml-core/#the-math-script-level-property
MetricsOverride
A metrics override value for a @font-face descriptor
SystemFont
void enum for system font, can never exist
VariantAlternates
Set of variant alternates
XTextScale
How to do font-size scaling.

Constantsยง

DEFAULT_SCRIPT_MIN_SIZE_PT ๐Ÿ”’
DEFAULT_SCRIPT_SIZE_MULTIPLIER ๐Ÿ”’
FONT_MEDIUM_LINE_HEIGHT_PX
The default line height.
FONT_MEDIUM_PX
The default font size.
FONT_STYLE_OBLIQUE_MAX_ANGLE_DEGREES
From https://drafts.csswg.org/css-fonts-4/#valdef-font-style-oblique-angle:
FONT_STYLE_OBLIQUE_MIN_ANGLE_DEGREES
The minimum angle value that font-style: oblique should compute to.
LARGER_FONT_SIZE_RATIO ๐Ÿ”’
This is the ratio applied for font-size: larger and smaller by both Firefox and Chrome
MAX_FONT_WEIGHT
The maximum font-weight value per:
MIN_FONT_WEIGHT
The minimum font-weight value per:

Functionsยง

parse_one_feature_value ๐Ÿ”’

Type Aliasesยง

FontFeatureSettings
This property provides low-level control over OpenType or TrueType font features.
FontSizeAdjust
Specified value for font-size-adjust, intended to help preserve the readability of text when font fallback occurs.
FontVariationSettings
This property provides low-level control over OpenType or TrueType font variations.
LineHeight
A specified value for the line-height property.
SpecifiedFontStyle
The specified value of the font-style property, without the system font crap.