Skip to content

Better support for unscaled glyphs (fixes #45)

Jeremy Soller requested to merge fschutt:master into master

Created by: fschutt

This commit should fix issues I had with reading the raw metrics from a font (for PDF purposes, you have to deal with unscaled fonts). There was previously no way to:

  • Get the raw width of a glyph in unscaled units
  • Get the ascender / descender of an unscaled font

This is needed because in PDF, fonts are scaled when text is written, not when the font is embedded. So I need access to the raw metrics.

The documentation is simply what I could derive from the naming, not sure if absolutely correct.

This would close https://github.com/dylanede/rusttype/issues/45

Merge request reports