Skip to main content

Module text

Module text 

Source
Expand description

Everything related to text, fonts, text layout, cursors etc.

Modules§

cursor
Different types of text cursors, i.e. ways to point into a super::Galley.

Structs§

ByteIndex
A byte offset into a UTF-8 string.
CharIndex
A character (Unicode scalar) offset into a string.
FallbackRequest
Input to a FontProvider.
FontData
A .ttf or .otf file and a font face index.
FontDefinitions
Describes a set of pre-configured fonts.
FontId
How to select a sized font.
FontInsert
A font to add to FontDefinitions, and which families to add it to.
FontTweak
Extra scale and vertical tweak to apply to all text of a certain font.
FontVariationAxis
A single variation axis of a variable font, e.g. weight (wght) or width (wdth).
Fonts
The collection of fonts used by epaint.
FontsView
The context’s collection of fonts, with this context’s pixels_per_point. This is what you use to do text layout.
Galley
Text that has been laid out, ready for painting.
Glyph
GlyphBitmap
A glyph bitmap, ready to be copied into the glyph atlas.
GlyphRasterizer
Rasterizes grapheme clusters using something other than the installed fonts, e.g. the browser on web, or your own custom glyphs.
GlyphRasterizerRequest
Input to a GlyphRasterizer.
InsertFontFamily
Where in the fallback chain of a FontFamily a FontInsert goes.
LayoutJob
Describes the task of laying out text.
LayoutSection
A contiguous range of LayoutJob::text that shares the same TextFormat.
PlacedRow
RasterizedGlyph
A glyph rasterized by a GlyphRasterizer.
Row
RowVisuals
The tessellated output of a row.
SmoothHinting
Tuning for HintingTarget::Smooth, mirroring skrifa’s Target::Smooth.
Tag
An OpenType tag.
TextFormat
Formatting option for a section of text.
TextOptions
Controls how we render text
TextWrapping
Controls the text wrapping and elision of a LayoutJob.
VariationCoords
List of font variation coordinates by axis tag. If more than one coordinate for a given axis is provided, the last one added is used.
ViewportKey
Identifies an independently rendered viewport’s text-layout cache.

Enums§

FontFamily
Font of unknown size.
FontPriority
Whether an inserted font (or crate::text::GlyphRasterizer) goes before or after the existing fonts of a family.
HintingTarget
How to hint glyph outlines, i.e. how aggressively to nudge them onto the pixel grid before rasterizing. Mirrors skrifa::outline::Target.
MissingGlyphPolicy
What to do with a character that nothing can draw: no installed font has it, no FontProvider finds a font for it, and no GlyphRasterizer handles it.
TextWrapMode
How to wrap and elide text.

Constants§

MAX_GLYPH_SIZE
Maximum width or height of a glyph rasterized into the font atlas.
PASSWORD_REPLACEMENT_CHAR
Suggested character to use to replace those in password text fields.

Traits§

ByteRangeExt
Extension methods for a ByteRange.
CharRangeExt
Extension methods for a CharRange.
FontProvider
A source of fonts.
IntoTag
Helper trait for all types that can be parsed as a font_types::Tag.

Functions§

has_emoji_presentation
Does this grapheme cluster have emoji presentation, per Unicode (UTS #51)?

Type Aliases§

Blob
Shared, immutable bytes of a font file.
ByteRange
A range of ByteIndex, i.e. a byte range into a str.
CharRange
A range of CharIndex, i.e. a character range into a str.