Skip to main content

Module font

Module font 

Source
Expand description

CSS properties for fonts, such as font-family, font-size, font-weight, and font-style.

Structs§

FontMetrics
Font metrics structure containing all font-related measurements from the font file tables (head, hhea, and os/2 tables).
FontRef
FontRef is a reference-counted pointer to a parsed font. It holds a *const c_void that points to the actual parsed font data (typically a ParsedFont from the layout crate).
Panose
PANOSE classification values for font identification (10 bytes). See https://learn.microsoft.com/en-us/typography/opentype/spec/os2#panose
StyleFontFamilyVec
StyleFontSize
Represents a font-size attribute

Enums§

CssFontStyleParseError
CssFontStyleParseErrorOwned
CssFontWeightParseError
CssFontWeightParseErrorOwned
CssStyleFontFamilyParseError
CssStyleFontFamilyParseErrorOwned
CssStyleFontSizeParseError
CssStyleFontSizeParseErrorOwned
OptionFontRef
StyleFontFamily
Represents a font-family attribute
StyleFontFamilyVecDestructor
StyleFontStyle
Represents the font-style property.
StyleFontWeight
Represents the font-weight property.

Functions§

parse_font_style
parse_font_weight
parse_style_font_family
parse_style_font_size

Type Aliases§

FontRefDestructorCallbackType
Callback type for FontRef destructor - must be extern “C” for FFI safety
StyleFontFamilyVecDestructorType