solvespace/test/request
whitequark 23feb4cf8f TTF: use metrics of 'A' to determine cap height.
SolveSpace 2.0 used the height of 'A' (i.e. cap height) to determine
the reference height.
SolveSpace 2.1 completely broke that during transition to Freetype,
and used something more or less random, by using FT_Set_Char_Size
with units_per_EM.
SolveSpace 2.2 attempted to fix that, but also used something more
or less random, by using FT_Request_Size with "unit" values.

Turns out that Freetype actually doesn't have a concept of cap height
at all. It is possible to extract it from the TT_OS2 table that is
present in some TrueType fonts, but it is not present in Microsoft
fonts (the msttcorefonts ones), and for those Linux fonts in which
it is present it doesn't appear very reliable.

So instead, use the height of 'A' instead, like version 2.0 did.
This has the advantage that it is quite bulletproof, and also matches
exactly what the old files are measured against.

One downside is that fonts without an 'A' glyph would not render.
We can deal with that when it becomes a problem.
2016-11-02 08:59:33 +00:00
..
arc_of_circle Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
circle Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
cubic Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
cubic_periodic Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
datum_point Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
line_segment Don't consider workplane origin point for bounding box calculation. 2016-11-02 02:43:45 +00:00
ttf_text TTF: use metrics of 'A' to determine cap height. 2016-11-02 08:59:33 +00:00