⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

render_glyph

Function render_glyph 

Source
pub fn render_glyph(
    parser: &TtfParser<'_>,
    ch: char,
    pixel_size: u16,
) -> Result<GlyphBitmap, FontError>
Expand description

Render a character to a grayscale bitmap at the given pixel size.

This is the main entry point for glyph rendering. It:

  1. Looks up the glyph ID from the character code via cmap.
  2. Parses the glyph outline from glyf.
  3. Rasterizes the outline to a bitmap.