Functions
hb_ot_var_has_data ()
hb_bool_t
hb_ot_var_has_data (hb_face_t *face
);
Tests whether a face includes any OpenType variation data in the fvar
table.
Returns
true if data found, false otherwise
Since: 1.4.2
hb_ot_var_find_axis_info ()
hb_bool_t
hb_ot_var_find_axis_info (hb_face_t *face
,
hb_tag_t axis_tag
,
hb_ot_var_axis_info_t *axis_info
);
Fetches the variation-axis information corresponding to the specified axis tag
in the specified face.
Returns
true if data found, false otherwise
Since: 2.2.0
hb_ot_var_get_axis_count ()
unsigned int
hb_ot_var_get_axis_count (hb_face_t *face
);
Fetches the number of OpenType variation axes included in the face.
Returns
the number of variation axes defined
Since: 1.4.2
hb_ot_var_get_axis_infos ()
unsigned int
hb_ot_var_get_axis_infos (hb_face_t *face
,
unsigned int start_offset
,
unsigned int *axes_count
,
hb_ot_var_axis_info_t *axes_array
);
Fetches a list of all variation axes in the specified face. The list returned will begin
at the offset provided.
Returns
the number of variation axes in the face
Since: 2.2.0
hb_ot_var_get_named_instance_count ()
unsigned int
hb_ot_var_get_named_instance_count (hb_face_t *face
);
Fetches the number of named instances included in the face.
Returns
the number of named instances defined
Since: 2.2.0
hb_ot_var_named_instance_get_subfamily_name_id ()
hb_ot_name_id_t
hb_ot_var_named_instance_get_subfamily_name_id
(hb_face_t *face
,
unsigned int instance_index
);
Fetches the name
table Name ID that provides display names for
the "Subfamily name" defined for the given named instance in the face.
Returns
the Name ID found for the Subfamily name
Since: 2.2.0
hb_ot_var_named_instance_get_postscript_name_id ()
hb_ot_name_id_t
hb_ot_var_named_instance_get_postscript_name_id
(hb_face_t *face
,
unsigned int instance_index
);
Fetches the name
table Name ID that provides display names for
the "PostScript name" defined for the given named instance in the face.
Returns
the Name ID found for the PostScript name
Since: 2.2.0
hb_ot_var_named_instance_get_design_coords ()
unsigned int
hb_ot_var_named_instance_get_design_coords
(hb_face_t *face
,
unsigned int instance_index
,
unsigned int *coords_length
,
float *coords
);
Fetches the design-space coordinates corresponding to the given
named instance in the face.
Returns
the number of variation axes in the face
Since: 2.2.0
hb_ot_var_normalize_variations ()
void
hb_ot_var_normalize_variations (hb_face_t *face
,
const hb_variation_t *variations
,
unsigned int variations_length
,
int *coords
,
unsigned int coords_length
);
Normalizes all of the coordinates in the given list of variation axes.
Since: 1.4.2
hb_ot_var_normalize_coords ()
void
hb_ot_var_normalize_coords (hb_face_t *face
,
unsigned int coords_length
,
const float *design_coords
,
int *normalized_coords
);
Normalizes the given design-space coordinates. The minimum and maximum
values for the axis are mapped to the interval [-1,1], with the default
axis value mapped to 0.
Any additional scaling defined in the face's avar
table is also
applied, as described at https://docs.microsoft.com/en-us/typography/opentype/spec/avar
Since: 1.4.2
Types and Values
HB_OT_TAG_VAR_AXIS_ITALIC
#define HB_OT_TAG_VAR_AXIS_ITALIC HB_TAG('i','t','a','l')
HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE
#define HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE HB_TAG('o','p','s','z')
HB_OT_TAG_VAR_AXIS_SLANT
#define HB_OT_TAG_VAR_AXIS_SLANT HB_TAG('s','l','n','t')
HB_OT_TAG_VAR_AXIS_WEIGHT
#define HB_OT_TAG_VAR_AXIS_WEIGHT HB_TAG('w','g','h','t')
HB_OT_TAG_VAR_AXIS_WIDTH
#define HB_OT_TAG_VAR_AXIS_WIDTH HB_TAG('w','d','t','h')
enum hb_ot_var_axis_flags_t
Since: 2.2.0
hb_ot_var_axis_info_t
typedef struct {
unsigned int axis_index;
hb_tag_t tag;
hb_ot_name_id_t name_id;
hb_ot_var_axis_flags_t flags;
float min_value;
float default_value;
float max_value;
} hb_ot_var_axis_info_t;
Data type for holding variation-axis values.
The minimum, default, and maximum values are in un-normalized, user scales.
Since: 2.2.0