Re-exports§
pub use crate::platform::font_list::fallback_font_families;
Structs§
FontDescriptor
describes the parameters of aFont
. It represents rendering a given font template at a particular size, with a particular font-variant-caps applied, etc. This contrasts withFontTemplateDescriptor
in that the latter represents only the parameters inherent in the font data (weight, stretch, etc.).- The font family parameters for font selection.
- A
FontGroup
is a prioritised list of fonts for a given set of font styles. It is used byTextRun
to decide which font to render a character with. If none of the fonts listed in the styles are suitable, a fallback font may be used. - A
FontGroupFamily
is a single font family in aFontGroup
. It corresponds to one of the families listed in thefont-family
CSS property. The corresponding font data is lazy-loaded, only if actually needed. A singleFontGroupFamily
can have multiple fonts, in the case that individual fonts only cover part of the Unicode range. - A
FontGroupFamily
can have multiple members if it is a “composite face”, meaning that it is defined by multiple@font-face
declarations which vary only by theirunicode-range
descriptors. In this case, font selection will select a single member that contains the necessary unicode character. Unicode ranges are specified by theFontGroupFamilyMember::template
member. - An entry in the shape cache.
- Various options that control text shaping.
Enums§
- The scope within which we will look for a font.
Constants§
Statics§
- Nanoseconds spent shaping text across all layout threads.
Traits§
Functions§
- Get the number of nanoseconds spent shaping text across all threads.
- Given a mapping array
mapping
and a value, map that value onto the value specified by the array. For instance, for FontConfig values of weights, we would map these onto the CSS [0..1000] range by creating an array as below. Values that fall between two mapped values, will be adjusted by the weighted mean.