Expand description
Font loading, text segmenting and shaping.
§Crate
This crate is part of the zng
project.
§Cargo Features
This crate provides 2 feature flags, 0 enabled by default.
§"hyphenation_embed_all"
Embed hyphenation dictionaries.
See the hyphenation
for more details.
§"svg"
Enable support for SVG image glyphs.
This feature signals that the IMAGES
service supports SVG. The app must ensure that this is so by
using zng-ext-svg
or another SVG extension.
Modules§
- font_
features - Font features and variation types.
Macros§
- font_
variations - Initialize a
FontVariations
map.
Structs§
- Bidi
Level - Embedding Level
- Caret
Index - Defines an insert offset in a shaped text.
- Color
Glyph - Represents all layer glyphs selected by the font to replace a colored glyph.
- Color
Glyphs - COLR table.
- Color
Palette - Represents a color palette entry.
- Color
Palette Type - Represents a color palette v1 flag.
- Color
Palettes - CPAL table.
- Custom
Font - Custom font builder.
- FONTS
- Font loading, custom fonts and app font configuration.
- Font
- A sized font face.
- Font
Changed Args FONT_CHANGED_EVENT
arguments.- Font
Data Ref - Reference to in memory font data.
- Font
Face - A font face selected from a font family.
- Font
Face List - A list of
FontFace
resolved from aFontName
list, plus the fallback font. - Font
Face Metrics - Various metrics that apply to the entire
FontFace
. - Font
List - A list of
Font
created from aFontFaceList
. - Font
Manager - Application extension that manages text fonts.
- Font
Metrics - Various metrics about a
Font
. - Font
Name - Font family name.
- Font
Names - A list of font names in priority order.
- Font
Stretch - The width of a font as an approximate fraction of the normal width.
- Font
Weight - The degree of stroke thickness of a font. This value ranges from 100.0 to 900.0, with 400.0 as normal.
- Generic
Fonts - Generic fonts configuration for the app.
- HYPHENATION
- Hyphenation service.
- Hyphenation
Data Dir - Represents a hyphenation data source that searches a directory.
- Hyphenation
Data Embedded - Represents embedded hyphenation data.
- Layout
Directions - Identifies what direction segments a
ShapedLine
has. - Segmented
Text - A string segmented in sequences of words, spaces, tabs and separated line breaks.
- Segmented
Text Iter - Segmented text iterator.
- Shaped
Line - Represents a line selection of a
ShapedText
. - Shaped
Segment - Represents a word or space selection of a
ShapedText
. - Shaped
Text - Output of text layout.
- Text
Overflow Info - Info about a shaped text overflow in constraint.
- Text
Segment - Represents a single text segment in a
SegmentedText
. - Text
Shaping Args - Extra configuration for
shape_text
.
Enums§
- Font
Change - Possible changes in a
FontChangedArgs
. - Font
Color Palette - Color palette selector for colored fonts.
- Font
Loading Error - Reasons why a loader might fail to load a font.
- Font
Style - The italic or oblique form of a font.
- Glyph
Loading Error - Reasons why a font might fail to load a glyph.
- Hyphens
- Hyphenation mode.
- Justify
- Text alignment justification mode.
- Line
Break - Configuration of text wrapping for Chinese, Japanese, or Korean text.
- Shaped
Colored Glyphs - Represents normal and colored glyphs in
ShapedText::colored_glyphs
. - Shaped
Image Glyphs - Represents normal and image glyphs in
ShapedText::image_glyphs
. - Text
Segment Kind - The type of an inline/text segment.
- Text
Transform Fn - Text transform function.
- White
Space - Text white space transform.
- Word
Break - Configure line breaks inside words during text wrap.
Statics§
- FONT_
CHANGED_ EVENT - Change in
FONTS
that may cause a font query to now give a different result.
Traits§
- Hyphenation
Data Source - Represents a hyphenation dictionary source.
- Outline
Sink - Receives Bézier path rendering commands from
Font::outline
.
Functions§
- f32_cmp
f32
comparison, panics forNaN
.- unicode_
bidi_ levels - Compute initial bidirectional levels of each segment of a
line
. - unicode_
bidi_ sort - Compute a map of segments in
line
to their final LTR display order.
Type Aliases§
- Font
Size - Text font size.
- Letter
Spacing - Extra spacing added in between text letters.
- Line
Height - Text line height.
- Line
Spacing - Extra spacing in-between text lines.
- Paragraph
Spacing - Extra spacing in-between paragraphs.
- TabLength
- Length of a
TAB
space. - Text
Line Thickness - Height of the text overline or strikethrough decoration.
- Underline
Thickness - Height of the text underline decoration.
- Word
Spacing - Extra spacing added to the Unicode
U+0020 SPACE
character.