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 treats Self::texture like any image texture; the metrics serve placement,
cache validation and cross-host tests.
Fields§
§texture: HostTextureGeneric texture identity and pixel declaration.
layout_x: f32The layout box’s left edge in the texture, in pixels. The same margin is added on both sides for overhanging ink.
layout_y: f32The layout box’s top edge in the texture, in pixels, with the same margin below.
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: f32Maximum ink extent above a baseline, at least the nominal ascent.
descent: f32Maximum ink extent below a baseline, at least the nominal descent.
line_count: u32Number of laid-out lines.