> I've been working with freetype recently and tried using the metrics
> on the font face to get information about underline position and
> thickness.  Using those I've run into an odd issue. No matter how
> big the font, the thickness and position is always the same.

Are you talking about the fields `underline_position' and
`underline_thickness' in `FT_Face'?  The documentation clearly states
that those values are in *font units*.  This means that you have to
scale them manually to the desired size (in pixels).

> I've also noticed that there is no fixed underline position in the
> metrics.  Reusing the underline thickness for strikethrough should
> be fine, but I'm not aware of any method to get strikethrough
> position.  Is there a standardized way to calculate strikethrough
> position?

Only TTFs and OTFs offer this value in the `OS/2' table, cf. fields
`yStrikeoutSize' and `yStrikeoutPosition' in struct `TT_OS2'.  Again,
you have to manually scale those values to the desired font size.  For
other font formats you have to compute those values by yourself.


    Werner

_______________________________________________
Freetype mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to