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. | |
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.
| 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.
| std::vector<float> pulp::canvas::ShapedRun::advances |
| std::uint8_t pulp::canvas::ShapedRun::bidi_level = 0 |
0 = LTR; odd = RTL.
| 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.
| ResolvedFont pulp::canvas::ShapedRun::font |
Resolved typeface + trace.
| std::vector<std::uint16_t> pulp::canvas::ShapedRun::glyph_ids |
Glyph data, parallel arrays of length glyph_ids.size().
| std::string pulp::canvas::ShapedRun::locale |
BCP-47; "" inherits from FontOptions.
| std::size_t pulp::canvas::ShapedRun::logical_end = 0 |
| std::size_t pulp::canvas::ShapedRun::logical_start = 0 |
Logical (input-order) UTF-8 byte range this run covers.
| RunMetrics pulp::canvas::ShapedRun::metrics |
| std::vector<float> pulp::canvas::ShapedRun::offsets_x |
| std::vector<float> pulp::canvas::ShapedRun::offsets_y |
| std::uint32_t pulp::canvas::ShapedRun::script_tag = 0 |
ISO 15924 four-char as packed u32; 0 = Common.