Change ptem API to make 0 mean unset
This commit is contained in:
parent
06c14225b2
commit
374bb48d90
|
@ -1124,7 +1124,6 @@ hb_font_create (hb_face_t *face)
|
||||||
font->parent = hb_font_get_empty ();
|
font->parent = hb_font_get_empty ();
|
||||||
font->face = hb_face_reference (face);
|
font->face = hb_face_reference (face);
|
||||||
font->klass = hb_font_funcs_get_empty ();
|
font->klass = hb_font_funcs_get_empty ();
|
||||||
font->ptem = -1;
|
|
||||||
|
|
||||||
font->x_scale = font->y_scale = hb_face_get_upem (face);
|
font->x_scale = font->y_scale = hb_face_get_upem (face);
|
||||||
|
|
||||||
|
@ -1201,7 +1200,7 @@ hb_font_get_empty (void)
|
||||||
|
|
||||||
0, /* x_ppem */
|
0, /* x_ppem */
|
||||||
0, /* y_ppem */
|
0, /* y_ppem */
|
||||||
-1, /* ptem */
|
0, /* ptem */
|
||||||
|
|
||||||
0, /* num_coords */
|
0, /* num_coords */
|
||||||
NULL, /* coords */
|
NULL, /* coords */
|
||||||
|
@ -1598,7 +1597,7 @@ hb_font_set_ptem (hb_font_t *font, float ptem)
|
||||||
* hb_font_get_ptem:
|
* hb_font_get_ptem:
|
||||||
* @font: a font.
|
* @font: a font.
|
||||||
*
|
*
|
||||||
* Gets the "point size" of the font. A value of -1 means unset.
|
* Gets the "point size" of the font. A value of 0 means unset.
|
||||||
*
|
*
|
||||||
* Return value: Point size.
|
* Return value: Point size.
|
||||||
*
|
*
|
||||||
|
|
|
@ -609,7 +609,7 @@ hb_font_get_ppem (hb_font_t *font,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Point size per EM. Used for optical-sizing in CoreText.
|
* Point size per EM. Used for optical-sizing in CoreText.
|
||||||
* A -1 means "not set".
|
* A value of zero means "not set".
|
||||||
*/
|
*/
|
||||||
HB_EXTERN void
|
HB_EXTERN void
|
||||||
hb_font_set_ptem (hb_font_t *font, float ptem);
|
hb_font_set_ptem (hb_font_t *font, float ptem);
|
||||||
|
|
Loading…
Reference in New Issue