Skip to main content

Crate fontique

Crate fontique 

Source
Expand description

Font enumeration and fallback.

§Features

The following crate feature flags are available:

  • std (enabled by default): Get floating point functions from the standard library (likely using your target’s libc).
  • libm: Use floating point implementations from libm. This is useful for no_std environments. However, note that the libm crate is not as efficient as the standard library.
  • bytemuck: Forwarded to parlance which then implements traits from bytemuck on its types.
  • system (enabled by default): Enable support for system font backends. This also enables std.
  • fontconfig-dlopen: Use dlopen to load the fontconfig library. This allows Fontique to compile even if the system does not have fontconfig installed, although font fallback to system fonts will not work in this case.

At least one of std and libm is required; std overrides libm. Note that Fontique requires that an allocator is available (i.e. it uses alloc).

Structs§

Attributes
Primary attributes for font matching: FontWidth, FontStyle and FontWeight.
AxisInfo
An axis of variation for a variable font.
Blob
Shared data with an associated unique identifier.
Charmap
Mapping from Unicode codepoints to nominal glyph identifiers.
CharmapIndex
Metadata for constructing a character map from font data.
Collection
Collection of fonts.
CollectionOptions
Options for a font collection.
FallbackKey
Describes a selector for fallback families.
FamilyId
Unique identifier for a font family.
FamilyInfo
Named set of fonts that are instances of a core design.
FontInfo
Representation of a single font in a family.
FontInfoOverride
Helper for specifying aspects of a font’s metadata to be overridden when the font is registered. Helpful when implementing a @font-face-like API, which allows those defining the fonts to specify certain font properties manually.
FontWeight
Visual weight class of a font, typically on a scale from 1.0 to 1000.0.
FontWidth
Visual width of a font — a relative change from the normal aspect ratio, typically in the range 0.5 to 2.0.
Language
A compact, zero-allocation language tag.
Query
State for font selection.
QueryFont
Candidate font generated by a Query.
Script
An ISO 15924 script identifier (four ASCII letters).
SourceCache
Cache for font data loaded from the file system.
SourceCacheOptions
Options for a source cache.
SourceId
Unique identifier for a font source.
SourceInfo
Handle that associates font data with a unique identifier.
Synthesis
Suggestions for synthesizing a set of font attributes for a given font.

Enums§

FontStyle
Visual style or “slope” of a font.
GenericFamily
Generic font families, named after CSS.
QueryFamily
Family descriptor for a font query.
QueryStatus
Determines whether a font query operation will continue.
SourceKind
Font data that is either a path to the font file or shared data in memory.

Traits§

FromFontconfig
Conversion from Fontconfig numeric values.
ScriptExt