[scale] More docs

This commit is contained in:
Behdad Esfahbod 2023-01-10 13:09:30 -07:00
parent c4580d8670
commit ccffce58cc
1 changed files with 11 additions and 1 deletions

View File

@ -2283,7 +2283,17 @@ hb_font_set_funcs_data (hb_font_t *font,
* types and you need to leave room for fractional values * types and you need to leave room for fractional values
* in there. * in there.
* *
* The choice is yours but needs to be consistent between * For example, to set the font size to 20, with 64
* levels of fractional precision you would call
* `hb_font_set_scale(font, 20 * 64, 20 * 64)`.
*
* In the example above, even what font size 20 means is up to
* you. It might be 20 pixels, or 20 points, or 20 millimeters.
* HarfBuzz does not care about that. You can set the point
* size of the font using hb_font_set_ptem(), and the pixel
* size using hb_font_set_ppem().
*
* The choice of scale is yours but needs to be consistent between
* what you set here, and what you expect out of #hb_position_t * what you set here, and what you expect out of #hb_position_t
* as well has draw / paint API output values. * as well has draw / paint API output values.
* *