You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TTFunk is both poorly documented and poorly tested, because we still pretty much treat it as an internal dependency of Prawn.
If you're using TTFunk indirectly through Prawn, and you call something like font.ascender or font.descender, you're going to get back a number that is in standard PDF points as units (i.e. 1/72 inch). But if you are talking about using TTFunk directly, it's important to understand that font metrics are not specified in absolute values, but instead are defined in relationship to an "em square", with the "units per em" defining the level of granularity. So until you apply the scale factor to some actual unit of measure, there aren't really any "units" to a font's points. Also, units-per-em are left up to the font designer, so they can be different for every font.
Extra documentation for TTFunk is absolutely welcome, but it's a low priority for us in Prawn at the moment, simply because we have many other problems to solve. That said, if you can read up on TTF a bit more and contribute documentation back to the project, that would help a lot.
It would be extremely helpful to get documentation to answer basic questions, such as, what units are the ascent and descent in?
The text was updated successfully, but these errors were encountered: