Glyph arrangement — the result of text layout, containing positioned glyphs for each line.
More...
#include <text_layout.hpp>
Glyph arrangement — the result of text layout, containing positioned glyphs for each line.
This is the Pulp equivalent of shaped, laid-out text.
Uses Skia's HarfBuzz-based text shaper internally for:
- Complex script shaping (Arabic, Devanagari, Thai, etc.)
- Bidirectional text (via ICU)
- Font fallback for missing glyphs
- Kerning and ligatures
◆ GlyphArrangement()
| pulp::canvas::GlyphArrangement::GlyphArrangement |
( |
| ) |
|
|
default |
◆ add_line()
| void pulp::canvas::GlyphArrangement::add_line |
( |
TextLine | line | ) |
|
|
inline |
Add a line of laid-out text.
◆ clear()
| void pulp::canvas::GlyphArrangement::clear |
( |
| ) |
|
|
inline |
◆ hit_test()
| size_t pulp::canvas::GlyphArrangement::hit_test |
( |
float | x, |
|
|
float | y ) const |
Find the text index nearest to a point (for cursor positioning).
◆ line_count()
| int pulp::canvas::GlyphArrangement::line_count |
( |
| ) |
const |
|
inline |
◆ lines()
| const std::vector< TextLine > & pulp::canvas::GlyphArrangement::lines |
( |
| ) |
const |
|
inline |
◆ position_for_index()
| float pulp::canvas::GlyphArrangement::position_for_index |
( |
size_t | index | ) |
const |
Get the x position for a given text index (for cursor rendering).
◆ total_height()
| float pulp::canvas::GlyphArrangement::total_height |
( |
| ) |
const |
|
inline |
◆ total_width()
| float pulp::canvas::GlyphArrangement::total_width |
( |
| ) |
const |
|
inline |
Get the bounding box of all laid-out text.
The documentation for this class was generated from the following file:
- /home/runner/work/pulp/pulp/core/canvas/include/pulp/canvas/text_layout.hpp