## hb-ot-metrics hb-ot-metrics — OpenType Metrics |

## Functions

hb_bool_t | hb_ot_metrics_get_position ()
float | hb_ot_metrics_get_variation ()
hb_position_t | hb_ot_metrics_get_x_variation ()
hb_position_t | hb_ot_metrics_get_y_variation ()

## Types and Values

enum | hb_ot_metrics_tag_t

## Includes

    #include <hb-ot.h>

## Description

Functions for fetching metrics from fonts.

## Functions

### hb_ot_metrics_get_position ()

    hb_bool_t
    hb_ot_metrics_get_position (hb_font_t *font,
                                hb_ot_metrics_tag_t metrics_tag,
                                hb_position_t *position);

It fetches metrics value corresponding to a given tag from a font.

#### Parameters

font | a hb_font_t object. |
metrics_tag | tag of metrics value you like to fetch. |
position | result of metrics value from the font. | [out][optional]

#### Returns

Whether found the requested metrics in the font.

Since: 2.6.0

### hb_ot_metrics_get_variation ()

    float
    hb_ot_metrics_get_variation (hb_font_t *font,
                                 hb_ot_metrics_tag_t metrics_tag);

Since: 2.6.0

### hb_ot_metrics_get_x_variation ()

    hb_position_t
    hb_ot_metrics_get_x_variation (hb_font_t *font,
                                   hb_ot_metrics_tag_t metrics_tag);

Since: 2.6.0

### hb_ot_metrics_get_y_variation ()

    hb_position_t
    hb_ot_metrics_get_y_variation (hb_font_t *font,
                                   hb_ot_metrics_tag_t metrics_tag);

Since: 2.6.0

## Types and Values

### enum hb_ot_metrics_tag_t

From https://docs.microsoft.com/en-us/typography/opentype/spec/mvarvalue-tags

#### Members

HB_OT_METRICS_TAG_HORIZONTAL_ASCENDER | horizontal ascender. |
HB_OT_METRICS_TAG_HORIZONTAL_DESCENDER | horizontal descender. |
HB_OT_METRICS_TAG_HORIZONTAL_LINE_GAP | horizontal line gap. |
HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_ASCENT | horizontal clipping ascent. |
HB_OT_METRICS_TAG_HORIZONTAL_CLIPPING_DESCENT | horizontal clipping descent. |
HB_OT_METRICS_TAG_VERTICAL_ASCENDER | vertical ascender. |
HB_OT_METRICS_TAG_VERTICAL_DESCENDER | vertical descender. |
HB_OT_METRICS_TAG_VERTICAL_LINE_GAP | vertical line gap. |
HB_OT_METRICS_TAG_HORIZONTAL_CARET_RISE | horizontal caret rise. |
HB_OT_METRICS_TAG_HORIZONTAL_CARET_RUN | horizontal caret run. |
HB_OT_METRICS_TAG_HORIZONTAL_CARET_OFFSET | horizontal caret offset. |
HB_OT_METRICS_TAG_VERTICAL_CARET_RISE | vertical caret rise. |
HB_OT_METRICS_TAG_VERTICAL_CARET_RUN | vertical caret run. |
HB_OT_METRICS_TAG_VERTICAL_CARET_OFFSET | vertical caret offset. |
HB_OT_METRICS_TAG_X_HEIGHT | x height. |
HB_OT_METRICS_TAG_CAP_HEIGHT | cap height. |
HB_OT_METRICS_TAG_SUBSCRIPT_EM_X_SIZE | subscript em x size. |
HB_OT_METRICS_TAG_SUBSCRIPT_EM_Y_SIZE | subscript em y size. |
HB_OT_METRICS_TAG_SUBSCRIPT_EM_X_OFFSET | subscript em x offset. |
HB_OT_METRICS_TAG_SUBSCRIPT_EM_Y_OFFSET | subscript em y offset. |
HB_OT_METRICS_TAG_SUPERSCRIPT_EM_X_SIZE | superscript em x size. |
HB_OT_METRICS_TAG_SUPERSCRIPT_EM_Y_SIZE | superscript em y size. |
HB_OT_METRICS_TAG_SUPERSCRIPT_EM_X_OFFSET | superscript em x offset. |
HB_OT_METRICS_TAG_SUPERSCRIPT_EM_Y_OFFSET | superscript em y offset. |
HB_OT_METRICS_TAG_STRIKEOUT_SIZE | strikeout size. |
HB_OT_METRICS_TAG_STRIKEOUT_OFFSET | strikeout offset. |
HB_OT_METRICS_TAG_UNDERLINE_SIZE | underline size. |
HB_OT_METRICS_TAG_UNDERLINE_OFFSET | underline offset. |
_HB_OT_METRICS_TAG_MAX_VALUE |  |

Since: 2.6.0