Class ShapedText

Class Documentation

class ShapedText

Owned immutable layout and original scalar/byte mappings.

No source string, provider, native resources or mutable font face is retained. Instances retain their font-byte snapshot, so subsequent glyph preparation uses the same faces.

Public Functions

inline const ::CE::Text::FontCollection &fonts() const noexcept

Declaration: [[nodiscard]]

Borrow the immutable font collection retained by this layout.

Keep this ShapedText alive and unmoved while using the reference; copy the collection for independent retention.

inline const ::CE::Text::LayoutOptions &options() const noexcept

Declaration: [[nodiscard]]

Borrow the options copied during layout.

The reference is invalidated by destruction/move of this value.

inline std::span<const ::CE::Text::Utf8Scalar> scalars() const noexcept

Declaration: [[nodiscard]]

Borrow decoded logical-order scalar/source records, including malformed-input replacements; retain this unmoved layout.

inline std::span<const ::CE::Text::ShapedGlyph> glyphs() const noexcept

Declaration: [[nodiscard]]

Borrow visually ordered glyphs and their logical shaping-cluster ranges; retain this unmoved layout.

inline std::span<const ::CE::Text::TextLine> lines() const noexcept

Declaration: [[nodiscard]]

Borrow accepted line records and glyph ranges; empty/source-only text can have no visible glyphs.

Retain this unmoved layout.

inline float line_height() const noexcept

Declaration: [[nodiscard]]

Return the selected font line advance in local pixels, independent of the number of lines.