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 and variation types.
Macros§
- Initialize a
FontVariations
map.
Structs§
- Embedding Level
- Defines an insert offset in a shaped text.
- Represents all layer glyphs selected by the font to replace a colored glyph.
- COLR table.
- Represents a color palette entry.
- Represents a color palette v1 flag.
- CPAL table.
- Custom font builder.
- Font loading, custom fonts and app font configuration.
- A sized font face.
FONT_CHANGED_EVENT
arguments.- Reference to in memory font data.
- A font face selected from a font family.
- Various metrics that apply to the entire
FontFace
. - A list of
Font
created from aFontFaceList
. - Application extension that manages text fonts.
- Various metrics about a
Font
. - Font family name.
- A list of font names in priority order.
- The width of a font as an approximate fraction of the normal width.
- The degree of stroke thickness of a font. This value ranges from 100.0 to 900.0, with 400.0 as normal.
- Generic fonts configuration for the app.
- Hyphenation service.
- Represents a hyphenation data source that searches a directory.
- Represents embedded hyphenation data.
- Identifies what direction segments a
ShapedLine
has. - A string segmented in sequences of words, spaces, tabs and separated line breaks.
- Segmented text iterator.
- Represents a line selection of a
ShapedText
. - Represents a word or space selection of a
ShapedText
. - Output of text layout.
- Info about a shaped text overflow in constraint.
- Represents a single text segment in a
SegmentedText
. - Extra configuration for
shape_text
.
Enums§
- Possible changes in a
FontChangedArgs
. - Color palette selector for colored fonts.
- Reasons why a loader might fail to load a font.
- The italic or oblique form of a font.
- Reasons why a font might fail to load a glyph.
- Hyphenation mode.
- Text alignment justification mode.
- Configuration of text wrapping for Chinese, Japanese, or Korean text.
- Represents normal and colored glyphs in
ShapedText::colored_glyphs
. - Represents normal and image glyphs in
ShapedText::image_glyphs
. - The type of an inline/text segment.
- Text transform function.
- Text white space transform.
- Configure line breaks inside words during text wrap.
Statics§
- Change in
FONTS
that may cause a font query to now give a different result.
Traits§
- Represents a hyphenation dictionary source.
- Receives Bézier path rendering commands from
Font::outline
.
Functions§
f32
comparison, panics forNaN
.- Compute initial bidirectional levels of each segment of a
line
. - Compute a map of segments in
line
to their final LTR display order.
Type Aliases§
- Text font size.
- Extra spacing added in between text letters.
- Text line height.
- Extra spacing in-between text lines.
- Extra spacing in-between paragraphs.
- Length of a
TAB
space. - Height of the text overline or strikethrough decoration.
- Height of the text underline decoration.
- Extra spacing added to the Unicode
U+0020 SPACE
character.