Module text

Source
Expand description

Text handling.

Modules§

color
Utilities for color font handling

Structs§

Costs
Costs for various layout decisions.
Coverage
A compactly encoded set of codepoints.
Decoration
A text decoration.
Font
An OpenType font.
FontBook
Metadata about a collection of fonts.
FontFamily
A lowercased font family like “arial”.
FontFeatures
OpenType font features settings.
FontFlags
Bitflags describing characteristics of a font.
FontInfo
Properties of a single font.
FontList
Font family fallback list.
FontMetrics
Metrics of a font.
FontStretch
The width of a font.
FontVariant
Properties that distinguish a font from other fonts in the same family.
FontWeight
The weight of a font.
Glyph
A glyph in a run of shaped text.
HighlightElem
Highlights text with a background color.
ItalicToggle
A toggle that turns on and off alternatingly if folded.
Lang
An identifier for a natural language.
LineMetrics
Metrics for a decorative line.
LinebreakElem
Inserts a line break.
OverlineElem
Adds a line over text.
RawElem
Raw text with optional syntax highlighting.
RawLine
A highlighted line of raw text.
RawSyntax
A loaded syntax.
RawTheme
A loaded syntect theme.
Region
An identifier for a region somewhere in the world.
SmallcapsElem
Displays text in small capitals.
SmartQuoteDict
A dict of single and double quotes.
SmartQuoteElem
A language-aware quote that reacts to its context.
SmartQuoteSet
An opening and closing quote.
SmartQuoter
A smart quote substitutor with zero lookahead.
SmartQuotes
Decides which quotes to substitute smart quotes with.
SpaceElem
A text space.
StrikeElem
Strikes through text.
StylisticSets
A set of stylistic sets to enable.
SubElem
Renders text in subscript.
SuperElem
Renders text in superscript.
TextDir
The direction of text and inline objects in their line.
TextElem
Customizes the look and layout of text in a variety of ways.
TextItem
A run of shaped text.
TextItemView
A slice of a TextItem.
TextSize
The size of text.
UnderlineElem
Underlines text.
WeightDelta
A delta that is summed up when folded.
WritingScript
An ISO 15924-type script identifier.

Enums§

BottomEdge
Specifies the top edge of text.
BottomEdgeMetric
Metrics that describe the bottom edge of text.
Case
A case transformation on text.
Caseable
A value whose case can be changed.
Covers
Defines which codepoints a font family will be used for.
DecoLine
A kind of decorative line.
FontStyle
The style of a font.
NumberType
Which kind of numbers / figures to select.
NumberWidth
The width of numbers / figures.
RawContent
The content of the raw text.
Smallcaps
What becomes small capitals.
TextEdgeBounds
Defines how to resolve a Bounds text edge.
TopEdge
Specifies the top edge of text.
TopEdgeMetric
Metrics that describe the top edge of text.
VerticalFontMetric
Identifies a vertical metric of a font.

Statics§

RAW_SYNTAXES
The syntect syntax definitions.
RAW_THEME
The default theme used for syntax highlighting.

Traits§

LocalName
The name with which an element is referenced.

Functions§

families
Resolve a prioritized iterator over the font families.
features
Collect the OpenType features to apply.
is_default_ignorable
Whether a codepoint is Unicode Default_Ignorable.
localized_str
Retrieves the localized string for a given language and region. Silently falls back to English if no fitting string exists for the given language + region. Panics if no fitting string exists in both given language + region and English.
lorem
Creates blind text.
lower
Converts a string or content to lowercase.
upper
Converts a string or content to uppercase.
variant
Resolve the font variant.