Skip to main content

outline_chem_run_em

Function outline_chem_run_em 

Source
pub fn outline_chem_run_em(
    glyphs: &[ChemGlyph],
    style: FaceStyle,
) -> (Option<Shape>, f64)
Expand description

Outline a chem glyph run in em space (+Y up). Returns (shape, advance_em).

Each glyph uses its own ChemGlyph::face. style is a fallback metrics face (cap-height for script shifts) when the run is empty of faces — callers usually pass the molecule default.

Subscripts drop by ~⅓ cap-height; superscripts rise by ~½ (RDKit-ish).