pub struct TextTexture {
pub texture: HostTexture,
pub layout_x: f32,
pub layout_y: f32,
pub layout_width: f32,
pub layout_height: f32,
pub first_baseline: f32,
pub ascent: f32,
pub descent: f32,
pub line_count: u32,
}Expand description
Layout facts attached to a host-rasterized text texture.
The compositor consumes Self::texture exactly like an image or decoded
video texture. These values are retained for placement, cache validation,
and cross-host contract tests; they never select a text-specific GPU path.
Fields§
§texture: HostTextureGeneric texture identity and pixel declaration.
layout_x: f32Where the layout box’s left edge lies in the texture, in pixels. The texture adds the same margin on both sides of the box for ink and decorations that reach past it.
layout_y: f32Where the layout box’s top edge lies in the texture, in pixels, with the same margin below the box.
layout_width: f32Logical layout width before integer pixel rounding.
layout_height: f32Logical layout height before integer pixel rounding.
first_baseline: f32Distance from the layout box’s top edge to the first alphabetic baseline.
ascent: f32Highest any line’s ink reaches above its baseline, and at least the nominal ascent the lines are spaced by.
descent: f32Lowest any line’s ink reaches below its baseline, and at least the nominal descent.
line_count: u32Number of laid-out lines.