94 enum class Kind : std::uint8_t {
Definition affine_transform.hpp:24
One grapheme cluster in the input.
Definition shaped_text.hpp:80
std::uint32_t utf8_start
UTF-8 byte offset (start, inclusive).
Definition shaped_text.hpp:81
std::uint32_t glyph_count
Glyph count for this cluster; 0 until glyph buffers are populated.
Definition shaped_text.hpp:85
std::uint32_t run_index
Index into ShapedText::runs.
Definition shaped_text.hpp:83
std::uint32_t glyph_start
First glyph in that run; 0 until glyph buffers are populated.
Definition shaped_text.hpp:84
std::uint32_t utf8_end
UTF-8 byte offset (end, exclusive).
Definition shaped_text.hpp:82
The typed, hashable contract that replaces (family_string, size) throughout the font subsystem.
Definition font_options.hpp:190
Line-break opportunity used by the line layout step.
Definition shaped_text.hpp:92
std::uint32_t utf8_offset
Definition shaped_text.hpp:93
Kind
Definition shaped_text.hpp:94
@ Hard
Wrap required (U+000A, U+2028, U+2029).
Definition shaped_text.hpp:96
@ Soft
Wrap allowed (whitespace / discretionary).
Definition shaped_text.hpp:95
enum pulp::canvas::LineBreakOpportunity::Kind kind
Definition font_resolver.hpp:216
Per-line / per-run typographic metrics.
Definition shaped_text.hpp:33
float ascent
Definition shaped_text.hpp:34
float line_height() const noexcept
Definition shaped_text.hpp:38
float descent
Definition shaped_text.hpp:35
float leading
Definition shaped_text.hpp:36
One run inside a ShapedText — a maximal slice of the input text that shares (bidi level × script × la...
Definition shaped_text.hpp:48
std::string locale
BCP-47; "" inherits from FontOptions.
Definition shaped_text.hpp:53
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.
Definition shaped_text.hpp:64
std::vector< float > offsets_x
Definition shaped_text.hpp:58
std::vector< float > advances
Definition shaped_text.hpp:57
RunMetrics metrics
Definition shaped_text.hpp:50
std::size_t logical_end
Definition shaped_text.hpp:68
ResolvedFont font
Resolved typeface + trace.
Definition shaped_text.hpp:49
std::vector< float > offsets_y
Definition shaped_text.hpp:59
std::size_t logical_start
Logical (input-order) UTF-8 byte range this run covers.
Definition shaped_text.hpp:67
std::vector< std::uint16_t > glyph_ids
Glyph data, parallel arrays of length glyph_ids.size().
Definition shaped_text.hpp:56
std::uint8_t bidi_level
0 = LTR; odd = RTL.
Definition shaped_text.hpp:51
float advance_total
Sum of advances plus letter/word spacing.
Definition shaped_text.hpp:72
std::uint32_t script_tag
ISO 15924 four-char as packed u32; 0 = Common.
Definition shaped_text.hpp:52
The canonical output of TextRunPlanner::shape(text, FontOptions).
Definition shaped_text.hpp:132
std::string text
Owned UTF-8 copy of the input.
Definition shaped_text.hpp:133
float total_width
Sum of per-run advance_total.
Definition shaped_text.hpp:144
std::vector< ClusterEntry > clusters
Definition shaped_text.hpp:137
RunMetrics overall_metrics
Worst-case ascent / descent / leading across all runs on a single notional line.
Definition shaped_text.hpp:149
std::vector< ShapedRun > runs
Definition shaped_text.hpp:136
std::vector< LineBreakOpportunity > line_breaks
Definition shaped_text.hpp:138
UnicodeIndexMap index_map
Definition shaped_text.hpp:139
bool empty() const noexcept
Definition shaped_text.hpp:151
FontOptions options
Full FontOptions blob the shape was produced for.
Definition shaped_text.hpp:134
JS counts UTF-16, ICU APIs vary between UTF-16 and scalar offsets, HarfBuzz reports cluster indices,...
Definition shaped_text.hpp:106
std::vector< std::uint32_t > byte_to_cluster
utf8_byte → cluster index.
Definition shaped_text.hpp:119
std::vector< std::uint32_t > scalar_offsets
scalar_offsets[i] = UTF-8 byte index of the i-th Unicode scalar value (codepoint).
Definition shaped_text.hpp:110
std::vector< std::uint32_t > utf16_offsets
utf16_offsets[i] = UTF-16 code-unit index of the i-th Unicode scalar.
Definition shaped_text.hpp:115
std::size_t scalar_count() const noexcept
Definition shaped_text.hpp:121