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

One run inside a ShapedText — a maximal slice of the input text that shares (bidi level × script × language × resolved typeface × applied features × applied variation axes). More...

#include <shaped_text.hpp>

Public Attributes

ResolvedFont font
 Resolved typeface + trace.
RunMetrics metrics
std::uint8_t bidi_level = 0
 0 = LTR; odd = RTL.
std::uint32_t script_tag = 0
 ISO 15924 four-char as packed u32; 0 = Common.
std::string locale
 BCP-47; "" inherits from FontOptions.
std::vector< std::uint16_t > glyph_ids
 Glyph data, parallel arrays of length glyph_ids.size().
std::vector< float > advances
std::vector< float > offsets_x
std::vector< float > offsets_y
std::vector< std::uint32_t > cluster_indices
 cluster_indices[i] is the UTF-8 byte index of the cluster the i-th glyph belongs to.
std::size_t logical_start = 0
 Logical (input-order) UTF-8 byte range this run covers.
std::size_t logical_end = 0
float advance_total = 0.0f
 Sum of advances plus letter/word spacing.

Detailed Description

One run inside a ShapedText — a maximal slice of the input text that shares (bidi level × script × language × resolved typeface × applied features × applied variation axes).

The current planner splits on bidi/script iterator boundaries when Skia's ICU-backed iterators are available, or on the fallback bidi analyzer when they are not.

Member Data Documentation

◆ advance_total

float pulp::canvas::ShapedRun::advance_total = 0.0f

Sum of advances plus letter/word spacing.

Computed once at shape time; consumed by ShapedText::total_width.

◆ advances

std::vector<float> pulp::canvas::ShapedRun::advances

◆ bidi_level

std::uint8_t pulp::canvas::ShapedRun::bidi_level = 0

0 = LTR; odd = RTL.

◆ cluster_indices

std::vector<std::uint32_t> pulp::canvas::ShapedRun::cluster_indices

cluster_indices[i] is the UTF-8 byte index of the cluster the i-th glyph belongs to.

Multiple glyphs can share a cluster (combining marks, ZWJ sequences). Multiple clusters can map to one glyph in Indic conjuncts.

◆ font

ResolvedFont pulp::canvas::ShapedRun::font

Resolved typeface + trace.

◆ glyph_ids

std::vector<std::uint16_t> pulp::canvas::ShapedRun::glyph_ids

Glyph data, parallel arrays of length glyph_ids.size().

◆ locale

std::string pulp::canvas::ShapedRun::locale

BCP-47; "" inherits from FontOptions.

◆ logical_end

std::size_t pulp::canvas::ShapedRun::logical_end = 0

◆ logical_start

std::size_t pulp::canvas::ShapedRun::logical_start = 0

Logical (input-order) UTF-8 byte range this run covers.

◆ metrics

RunMetrics pulp::canvas::ShapedRun::metrics

◆ offsets_x

std::vector<float> pulp::canvas::ShapedRun::offsets_x

◆ offsets_y

std::vector<float> pulp::canvas::ShapedRun::offsets_y

◆ script_tag

std::uint32_t pulp::canvas::ShapedRun::script_tag = 0

ISO 15924 four-char as packed u32; 0 = Common.


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