pub type TextLayoutHandle = Arc<PreparedTextLayout>;Expand description
Cheap handle to a prepared layout (Arc clone).
Cloning the handle increments a reference count and does not repeat shaping or copy glyph/font data.
§Examples
use std::sync::Arc;
use ailloli_ui_core::{Color, FontId, TextStyle};
use ailloli_ui_text::{TextLayoutHandle, TextLayoutParams, TextSystem};
let mut system = TextSystem::new();
let handle: TextLayoutHandle = system.layout_cached(TextLayoutParams::new(
"shared", TextStyle::new(FontId::Ui, 14, Color::WHITE),
));
assert!(Arc::ptr_eq(&handle, &handle.clone()));Aliased Type§
struct TextLayoutHandle { /* private fields */ }