Skip to main content

Crate harfrust

Crate harfrust 

Source
Expand description

Text shaping with a Rust port of HarfBuzz.

Create a ShaperFont from a Font, add Unicode text to a Buffer, and call shape to replace the text with positioned glyphs.

Modules§

font
Font types supplied by read-fonts.
unicode
Unicode properties and canonical composition used by the shaper.

Structs§

Advances
A batch of glyphs and their writable advances.
Buffer
A buffer of text to be shaped, and of the glyphs that shaping produces.
BufferFlags
Flags that control how a buffer is shaped.
Feature
An OpenType feature and the text range where it applies.
Font
A font at one location in its design space.
GlyphExtents
The ink extents of a glyph.
GlyphFlags
Flags that describe the properties of a glyph.
GlyphId
A 32-bit glyph identifier.
GlyphInfo
A glyph and its relationship to the input text.
GlyphPosition
The advances and offsets of a shaped glyph.
Language
A language tag used to select shaping rules.
NominalGlyphs
A batch of codepoints and writable nominal glyphs.
RawAdvances
Raw C-style view over a batch of glyphs and their writable advances.
RawNominalGlyphs
Raw C-style view over a batch of codepoints and output glyphs.
Scale
Converts font units to the configured font scale.
Script
A text script identified by an ISO 15924 tag.
SerializeFlags
Flags used for serializing a buffer.
ShapeOptions
Optional settings for a shaping operation.
ShapePlan
A reusable plan for shaping with one set of segment properties.
ShapePlanKey
The properties used to match a reusable ShapePlan.
ShaperFont
A font configured for shaping and font queries.
Tag
An OpenType tag.

Enums§

ClusterLevel
How input text clusters are assigned to output glyphs.
ContentType
The type of contents currently held by a Buffer.
Direction
Defines the direction in which text is to be read.
ShapeError
The reason a call to shape could not produce glyphs.

Traits§

FontFuncs
Overrides character mapping and glyph metrics for a ShaperFont.

Functions§

shape
Shapes Unicode content in place using the configured font.