Crate fonts

Source

Re-exportsยง

pub use platform::font_list::fallback_font_families;

Modulesยง

font ๐Ÿ”’
font_context ๐Ÿ”’
font_store ๐Ÿ”’
glyph ๐Ÿ”’
platform
shapers ๐Ÿ”’
system_font_service ๐Ÿ”’

Structsยง

ByteIndex
An index that refers to a byte offset in a text run. This could the middle of a glyph.
CSSFontFaceDescriptors
This data structure represents the various optional descriptors that can be applied to a @font-face rule in CSS. These are used to create a [FontTemplate] from the given font data used as the source of the @font-face rule. If values like weight, stretch, and style are not specified they are initialized based on the contents of the font itself.
FallbackFontSelectionOptions
Font
FontBaseline
FontContext
The FontContext represents the per-thread/thread state necessary for working with fonts. It is the public API used by the layout and paint code. It talks directly to the system font service where required.
FontData
A data structure to store data for fonts. Data is stored internally in an IpcSharedMemory handle, so that it can be sent without serialization across IPC channels.
FontDataAndIndex
Raw font data and an index
FontDescriptor
FontDescriptor describes the parameters of a Font. It represents rendering a given font template at a particular size, with a particular font-variant-caps applied, etc. This contrasts with FontTemplateDescriptor in that the latter represents only the parameters inherent in the font data (weight, stretch, etc.).
FontFamilyDescriptor
The font family parameters for font selection.
FontGroup
A FontGroup is a prioritised list of fonts for a given set of font styles. It is used by TextRun 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.
FontMetrics
FontRef
FontTemplate
This describes all the information needed to create font instance handles. It contains a unique FontTemplateData structure that is platform specific.
FontTemplateDescriptor
Describes how to select a font from a given family. This is very basic at the moment and needs to be expanded or refactored when we support more of the font styling parameters.
FontTemplateRef
A reference to a FontTemplate with shared ownership and mutability.
FontTemplates
A list of font templates that make up a given font family.
GlyphRun
A single series of glyphs within a text run.
GlyphStore
Stores the glyph data belonging to a text run.
LocalFontIdentifier
An identifier for a local font on systems using Freetype.
LowercaseFontFamilyName
ShapingFlags
ShapingOptions
Various options that control text shaping.
SystemFontService
The system font service. There is one of these for every Servo instance. This is a thread, responsible for reading the list of system fonts, handling requests to match against them, and ensuring that only one copy of system font data is loaded at a time.
SystemFontServiceProxy
The public interface to the [SystemFontService], used by per-Document FontContext instances.
SystemFontServiceProxySender

Enumsยง

ComputedFontStyleDescriptor
A version of FontStyle from Stylo that is serializable. Normally this is not because the specified version of FontStyle contains floats.
EmojiPresentationPreference ๐Ÿ”’
Whether or not font fallback selection prefers the emoji or text representation of a character. If None then either presentation is acceptable.
FontDataError
FontIdentifier
FontSearchScope
The scope within which we will look for a font.
GlyphInfo
SystemFontServiceMessage
Commands that the FontContext sends to the SystemFontService.

Constantsยง

LAST_RESORT_GLYPH_ADVANCE

Traitsยง

FontContextWebFontMethods
FontTemplateRefMethods
IsOblique
PlatformFontMethods

Functionsยง

fixed_to_float ๐Ÿ”’
float_to_fixed ๐Ÿ”’

Type Aliasesยง

StylesheetWebFontLoadFinishedCallback