/** * hb_style_get_value: * @font: a #hb_font_t object. * @style_tag: a style tag. * * Searches variation axes of a #hb_font_t object for a specific axis first, * if not set, first tries to get default style values in `STAT` table * then tries to polyfill from different tables of the font. * * Returns: Corresponding axis or default value to a style tag. * * Since: 3.0.0
**/ float
hb_style_get_value (hb_font_t *font, hb_style_tag_t style_tag)
{ if (unlikely (style_tag == HB_STYLE_TAG_SLANT_RATIO)) return _hb_angle_to_ratio (hb_style_get_value (font, HB_STYLE_TAG_SLANT_ANGLE));
hb_face_t *face = font->face;
#ifndef HB_NO_VAR
hb_ot_var_axis_info_t axis; if (hb_ot_var_find_axis_info (face, style_tag, &axis))
{ if (axis.axis_index < font->num_coords) return font->design_coords[axis.axis_index]; /* If a face is variable, fvar's default_value is better than STAT records */ return axis.default_value;
} #endif
if (style_tag == HB_STYLE_TAG_OPTICAL_SIZE && font->ptem) return font->ptem;
/* STAT */ float value; if (face->table.STAT->get_value (style_tag, &value)) return value;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.