JFLib

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 FontRaster Glyph 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) -> FontRaster Raster policy of a registered face. Unknown ids follow the fallback face.
  • fn set_font_raster(&mut self, font: u32, raster: FontRaster) -> bool Change only this face's rasterization; invalidate cached masks on change. Returns false for an unregistered id. Measuring and caret advances are unchanged.

Source: docs/API.md in the JFLib repository.