text/rendering.rs#
Source: lib/text/rendering.rs
Per-face raster policy. Layout advances, document fonts and legacy renderers
keep their original contracts; styles opt in only for their own UI faces.
enum FontRasterGlyph rasterization independent of font metrics and text editing coordinates.Legacy-- Original x-height fitting and downward quarter-pixel positioning.Natural-- Preserve the outline scale and round to the nearest quarter pixel.
impl Text
fn font_raster(&self, font: u32) -> FontRasterRaster policy of a registered face. Unknown ids follow the fallback face.fn set_font_raster(&mut self, font: u32, raster: FontRaster) -> boolChange only this face's rasterization; invalidate cached masks on change. Returns false for an unregistered id. Measuring and caret advances are unchanged.