Skip to main content

text_span_ascent

Function text_span_ascent 

Source
pub fn text_span_ascent(
    text: &Rc<str>,
    range: Option<(usize, usize)>,
    size_px: f32,
) -> f32
Expand description

共享整串 + 区间的首行字体 ascent(逻辑像素)。 与 paint_text_span 使用同一 shape 缓存 key,不产生额外 shaping。