Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::canvas::ShapedText Struct Reference

The canonical output of TextRunPlanner::shape(text, FontOptions). More...

#include <shaped_text.hpp>

Public Member Functions

bool empty () const noexcept

Public Attributes

std::string text
 Owned UTF-8 copy of the input.
FontOptions options
 Full FontOptions blob the shape was produced for.
std::vector< ShapedRun > runs
std::vector< ClusterEntry > clusters
std::vector< LineBreakOpportunity > line_breaks
UnicodeIndexMap index_map
float total_width = 0.0f
 Sum of per-run advance_total.
RunMetrics overall_metrics
 Worst-case ascent / descent / leading across all runs on a single notional line.

Detailed Description

The canonical output of TextRunPlanner::shape(text, FontOptions).

Owned, immutable once produced. Consumed by both measurement (TextShaper line layout) and paint (SkiaCanvas); the same instance flows through both pipelines so they cannot diverge.

Member Function Documentation

◆ empty()

bool pulp::canvas::ShapedText::empty ( ) const
inlinenoexcept

Member Data Documentation

◆ clusters

std::vector<ClusterEntry> pulp::canvas::ShapedText::clusters

◆ index_map

UnicodeIndexMap pulp::canvas::ShapedText::index_map

◆ line_breaks

std::vector<LineBreakOpportunity> pulp::canvas::ShapedText::line_breaks

◆ options

FontOptions pulp::canvas::ShapedText::options

Full FontOptions blob the shape was produced for.

◆ overall_metrics

RunMetrics pulp::canvas::ShapedText::overall_metrics

Worst-case ascent / descent / leading across all runs on a single notional line.

Used for mixed-fontSize line layout (max ascent + max descent).

◆ runs

std::vector<ShapedRun> pulp::canvas::ShapedText::runs

◆ text

std::string pulp::canvas::ShapedText::text

Owned UTF-8 copy of the input.

◆ total_width

float pulp::canvas::ShapedText::total_width = 0.0f

Sum of per-run advance_total.

The width the painter will produce when this ShapedText is rendered on a single line without wrapping.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/canvas/include/pulp/canvas/shaped_text.hpp