## hb-ot-var hb-ot-var — OpenType Font Variations |

## Functions

hb_bool_t | hb_ot_var_has_data ()
hb_bool_t | hb_ot_var_find_axis ()
unsigned int | hb_ot_var_get_axis_count ()
unsigned int | hb_ot_var_get_axes ()
void | hb_ot_var_normalize_variations ()
void | hb_ot_var_normalize_coords ()

## Types and Values

#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
#define | HB_OT_VAR_NO_AXIS_INDEX
| hb_ot_var_axis_t

## Includes

    #include <hb-ot.h>

## Description

Functions for fetching information about OpenType Variable Fonts.

## Functions

### hb_ot_var_has_data ()

    hb_bool_t
    hb_ot_var_has_data (hb_face_t *face);

This function allows to verify the presence of OpenType variation data on the face. Alternatively, use `hb_ot_var_get_axis_count()`.

#### Parameters

face | hb_face_t to test |

#### Returns

true if face has a `fvar' table and false otherwise

Since: 1.4.2

### hb_ot_var_find_axis ()

    hb_bool_t
    hb_ot_var_find_axis (hb_face_t *face,
                         hb_tag_t axis_tag,
                         unsigned int *axis_index,
                         hb_ot_var_axis_t *axis_info);

Since: 1.4.2

### hb_ot_var_get_axis_count ()

    unsigned int
    hb_ot_var_get_axis_count (hb_face_t *face);

Since: 1.4.2

### hb_ot_var_get_axes ()

    unsigned int
    hb_ot_var_get_axes (hb_face_t *face,
                        unsigned int start_offset,
                        unsigned int *axes_count,
                        hb_ot_var_axis_t *axes_array);

Since: 1.4.2

### 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);

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);

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')

### HB_OT_VAR_NO_AXIS_INDEX

    #define HB_OT_VAR_NO_AXIS_INDEX		0xFFFFFFFFu

Since: 1.4.2

### hb_ot_var_axis_t

    typedef struct {
      hb_tag_t tag;
      unsigned int name_id;
      float min_value;
      float default_value;
      float max_value;
    } hb_ot_var_axis_t;

Since: 1.4.2