Skip to main content Module cache Copy item path Source pub use crate::font_traits::ParsedFontTrait ;pub use crate::font_traits::ShallowClone ;BidiLevel BreakCursor ContentIndex A stable, logical pointer to an item within the original InlineContent array. CursorBoundsError Error returned when cursor movement hits a boundary FlowLayout Represents the final layout distributed across multiple fragments. FontChainKey Key for caching font chains - based only on CSS properties, not text content FontHash A reference to a font for rendering, identified by its hash.
This hash corresponds to ParsedFont::hash and is used to look up
the actual font data in the renderer’s font cache. FontManager FontSelector A selector for loading fonts from the font cache.
Used by FontManager to query fontconfig and load font files. Glyph Enhanced glyph with all features GraphemeClusterId A stable, logical identifier for a grapheme cluster. HyphenationBreak Represents a single valid hyphenation point within a word. InitialLetter InlineBorderInfo Border information for inline elements (display: inline, inline-block) InlineBreak InlineImage InlineShape InlineSpace LayoutCache LayoutFontMetrics Layout-specific font metrics extracted from FontMetrics
Contains only the metrics needed for text layout and rendering LayoutFragment Defines a single area for layout, with its own shape and properties. LayoutKey Key for the final layout stage. LineConstraints Line constraints with multi-segment support LineSegment LoadedFonts A map of pre-loaded fonts, keyed by FontId (from rust-fontconfig) LogicalItemsKey Key for caching the conversion from InlineContent to LogicalItems. MeasuredImage MeasuredShape OverflowInfo Stores information about content that exceeded the available layout space. PartialStyleProperties Point PositionedItem Rect ShapeConstraints ShapedCluster A group of glyphs that corresponds to one or more source characters (a cluster). ShapedGlyph A single, shaped glyph with its essential metrics. ShapedItemsKey Key for caching the shaping stage. Size Stroke StyleOverride StyleProperties Style properties with vertical text support StyledRun TextDecoration TextRunInfo UnifiedConstraints Unified constraints combining all layout features UnifiedLayout UnifiedLine Intermediate structure carrying information from the line breaker to the positioner. VerticalMetrics VisualItem VisualItemsKey Key for caching the Bidi reordering stage. VisualRun AvailableSpace Available space for layout, similar to Taffy’s AvailableSpace. BidiDirection BreakType CharacterClass ClearType FontChainKeyOrRef Either a FontChainKey (resolved via fontconfig) or a direct FontRef hash. FontOrRef Enum that wraps either a fontconfig-resolved font (T) or a direct FontRef. FontStack Font stack that can be either a list of font selectors (resolved via fontconfig)
or a direct FontRef (bypasses fontconfig entirely). FontStyle FontVariantCaps FontVariantEastAsian FontVariantLigatures FontVariantNumeric GlyphKind The kind of a glyph, used to distinguish characters from layout-inserted items. GlyphOrientation GlyphSource ImageSource InlineContent JustifyContent LayoutError LogicalItem ObjectFit OverflowBehavior PathSegment SegmentAlignment Defines how text should be aligned when a line contains multiple disjoint segments. ShapeBoundary ShapeDefinition ShapedItem Spacing TextAlign TextBoundary Text boundary types for cursor movement TextCombineUpright TextOrientation TextTransform TextWrap VerticalAlign WritingMode break_one_line Breaks a single line of items to fit within the given geometric constraints,
handling multi-segment lines and hyphenation.
Break a single line from the current cursor position. create_logical_items find_all_hyphenation_breaks A “word” is defined as a sequence of one or more adjacent ShapedClusters. get_base_direction_from_logical get_item_measure Helper to get the primary measure (width or height) of a shaped item. get_item_vertical_metrics Gets the ascent (distance from baseline to top) and descent (distance from baseline to bottom)
for a single item. is_word_separator Helper to identify if an item is a word separator (like a space). justify_kashida_and_rebuild Rebuilds a line of items, inserting Kashida glyphs for justification. perform_fragment_layout Performs layout for a single fragment, consuming items from a BreakCursor. position_one_line Positions a single line of items, handling alignment and justification within segments. reorder_logical_items shape_visual_items Shape visual items into ShapedItems using pre-loaded fonts. CacheId FourCc