| Top |
| hb_bool_t | hb_ot_var_has_data () |
| hb_bool_t | hb_ot_var_find_axis_info () |
| unsigned int | hb_ot_var_get_axis_count () |
| unsigned int | hb_ot_var_get_axis_infos () |
| unsigned int | hb_ot_var_get_named_instance_count () |
| hb_ot_name_id_t | hb_ot_var_named_instance_get_subfamily_name_id () |
| hb_ot_name_id_t | hb_ot_var_named_instance_get_postscript_name_id () |
| unsigned int | hb_ot_var_named_instance_get_design_coords () |
| void | hb_ot_var_normalize_variations () |
| void | hb_ot_var_normalize_coords () |
| #define | HB_OT_TAG_VAR_AXIS_ITALIC |
| #define | HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE |
| #define | HB_OT_TAG_VAR_AXIS_SLANT |
| #define | HB_OT_TAG_VAR_AXIS_WEIGHT |
| #define | HB_OT_TAG_VAR_AXIS_WIDTH |
| enum | hb_ot_var_axis_flags_t |
| hb_ot_var_axis_info_t |
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.
Since: 1.4.2
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.
face |
hb_face_t to work upon |
|
axis_tag |
The hb_tag_t of the variation axis to query |
|
axis_info |
The hb_ot_var_axis_info_t of the axis tag queried. |
[out] |
Since: 2.2.0
unsigned int
hb_ot_var_get_axis_count (hb_face_t *face);
Fetches the number of OpenType variation axes included in the face.
Since: 1.4.2
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.
face |
hb_face_t to work upon |
|
start_offset |
offset of the first lookup to retrieve |
|
axes_count |
Input = the maximum number of variation axes to return; Output = the actual number of variation axes returned (may be zero). |
[inout][allow-none] |
axes_array |
The array of variation axes found. |
[out caller-allocates][array length=axes_count] |
Since: 2.2.0
unsigned int
hb_ot_var_get_named_instance_count (hb_face_t *face);
Fetches the number of named instances included in the face.
Since: 2.2.0
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.
Since: 2.2.0
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.
Since: 2.2.0
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.
face |
The hb_face_t to work on |
|
instance_index |
The index of the named instance to query |
|
coords_length |
Input = the maximum number of coordinates to return; Output = the actual number of coordinates returned (may be zero). |
[inout][allow-none] |
coords |
The array of coordinates found for the query. |
[out][array length=coords_length] |
Since: 2.2.0
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.
face |
The hb_face_t to work on |
|
variations |
The array of variations to normalize |
|
variations_length |
The number of variations to normalize |
|
coords |
The array of normalized coordinates. |
[out][array length=coords_length] |
coords_length |
The length of the coordinate array |
Since: 1.4.2
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
face |
The hb_face_t to work on |
|
coords_length |
The length of the coordinate array |
|
design_coords |
The design-space coordinates to normalize |
|
normalized_coords |
The normalized coordinates. |
[out] |
Since: 1.4.2
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.
flags is
HB_OT_VAR_AXIS_FLAG_HIDDEN.Index of the axis in the variation-axis array |
||
hb_tag_t |
The hb_tag_t tag identifying the design variation of the axis |
|
hb_ot_name_id_t |
The |
|
hb_ot_var_axis_flags_t |
The hb_ot_var_axis_flags_t flags for the axis |
|
The mininum value on the variation axis that the font covers |
||
The position on the variation axis corresponding to the font's defaults |
||
The maximum value on the variation axis that the font covers |
Since: 2.2.0