ShapedTextRun
struct · ferroui-base · v0.5.0
struct ShapedTextRun
A text run that holds shaped characters.
Members
newbidi_levelshaped_bufferrun_propertiestext_metricsglyph_runadd_reftry_measure_characterstry_measure_characters_backwardsdispose
new
fn new(shaped_buffer: Rc<ShapedBuffer>, properties: Rc<dyn TextRunProperties>) -> Self
bidi_level
fn bidi_level(self: &Self) -> i8
The bidi level of the run.
shaped_buffer
fn shaped_buffer(self: &Self) -> &Rc<ShapedBuffer>
The shaped glyphs of the run.
run_properties
fn run_properties(self: &Self) -> &Rc<dyn TextRunProperties>
The run's properties (never absent for a shaped run).
text_metrics
fn text_metrics(self: &Self) -> TextMetrics
The metrics of the run's font at the run's em size.
glyph_run
fn glyph_run(self: &Self) -> &Rc<GlyphRun>
The glyph run of the shaped glyphs (created on first use).
add_ref
fn add_ref(self: &Rc<Self>) -> Rc<Self>
Registers another owner of the run; every owner calls ShapedTextRun::dispose once.
try_measure_characters
fn try_measure_characters(self: &Self, available_width: f64) -> Option<i32>
Measures the number of characters that fit into available width.
try_measure_characters_backwards
fn try_measure_characters_backwards(self: &Self, available_width: f64) -> Option<(i32, f64)>
Measures the number of characters that fit into available width when measuring from the end; returns the count and the width they take.
Internal upstream; public so that the Skia unit tests reach it.
dispose
fn dispose(self: &Self)
Releases one reference; the glyph run and the shaped buffer are disposed with the last one.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherTextRunDrawableTextRun
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.