## hb-ot-layout hb-ot-layout |

## Synopsis

    #define             HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX
    #define             HB_OT_LAYOUT_NO_FEATURE_INDEX
    #define             HB_OT_LAYOUT_NO_SCRIPT_INDEX
    #define             HB_OT_TAG_GDEF
    #define             HB_OT_TAG_GPOS
    #define             HB_OT_TAG_GSUB
    void                hb_ot_layout_collect_lookups        (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             const hb_tag_t *scripts,
                                                             const hb_tag_t *languages,
                                                             const hb_tag_t *features,
                                                             hb_set_t *lookup_indexes);
    unsigned int        hb_ot_layout_feature_get_lookups    (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int feature_index,
                                                             unsigned int start_offset,
                                                             unsigned int *lookup_count,
                                                             unsigned int *lookup_indexes);
    unsigned int        hb_ot_layout_get_attach_points      (hb_face_t *face,
                                                             hb_codepoint_t glyph,
                                                             unsigned int start_offset,
                                                             unsigned int *point_count,
                                                             unsigned int *point_array);
    hb_ot_layout_glyph_class_t hb_ot_layout_get_glyph_class (hb_face_t *face,
                                                             hb_codepoint_t glyph);
    void                hb_ot_layout_get_glyphs_in_class    (hb_face_t *face,
                                                             hb_ot_layout_glyph_class_t klass,
                                                             hb_set_t *glyphs);
    unsigned int        hb_ot_layout_get_ligature_carets    (hb_font_t *font,
                                                             hb_direction_t direction,
                                                             hb_codepoint_t glyph,
                                                             unsigned int start_offset,
                                                             unsigned int *caret_count,
                                                             hb_position_t *caret_array);
    hb_bool_t           hb_ot_layout_get_size_params        (hb_face_t *face,
                                                             unsigned int *design_size,
                                                             unsigned int *subfamily_id,
                                                             unsigned int *subfamily_name_id,
                                                             unsigned int *range_start,
                                                             unsigned int *range_end);
    enum                hb_ot_layout_glyph_class_t;
    hb_bool_t           (*hb_ot_layout_glyph_sequence_func_t)
                                                            (hb_font_t *font,
                                                             hb_tag_t table_tag,
                                                             unsigned int lookup_index,
                                                             const hb_ot_layout_glyph_sequence_t *sequence,
                                                             void *user_data);
    hb_bool_t           hb_ot_layout_has_glyph_classes      (hb_face_t *face);
    hb_bool_t           hb_ot_layout_has_positioning        (hb_face_t *face);
    hb_bool_t           hb_ot_layout_has_substitution       (hb_face_t *face);
    hb_bool_t           hb_ot_layout_language_find_feature  (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int language_index,
                                                             hb_tag_t feature_tag,
                                                             unsigned int *feature_index);
    unsigned int        hb_ot_layout_language_get_feature_indexes
                                                            (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int language_index,
                                                             unsigned int start_offset,
                                                             unsigned int *feature_count,
                                                             unsigned int *feature_indexes);
    unsigned int        hb_ot_layout_language_get_feature_tags
                                                            (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int language_index,
                                                             unsigned int start_offset,
                                                             unsigned int *feature_count,
                                                             hb_tag_t *feature_tags);
    hb_bool_t           hb_ot_layout_language_get_required_feature_index
                                                            (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int language_index,
                                                             unsigned int *feature_index);
    void                hb_ot_layout_lookup_collect_glyphs  (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int lookup_index,
                                                             hb_set_t *glyphs_before,
                                                             hb_set_t *glyphs_input,
                                                             hb_set_t *glyphs_after,
                                                             hb_set_t *glyphs_output);
    void                hb_ot_layout_lookup_substitute_closure
                                                            (hb_face_t *face,
                                                             unsigned int lookup_index,
                                                             hb_set_t *glyphs);
    hb_bool_t           hb_ot_layout_lookup_would_substitute
                                                            (hb_face_t *face,
                                                             unsigned int lookup_index,
                                                             const hb_codepoint_t *glyphs,
                                                             unsigned int glyphs_length,
                                                             hb_bool_t zero_context);
    hb_bool_t           hb_ot_layout_script_find_language   (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             hb_tag_t language_tag,
                                                             unsigned int *language_index);
    unsigned int        hb_ot_layout_script_get_language_tags
                                                            (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int start_offset,
                                                             unsigned int *language_count,
                                                             hb_tag_t *language_tags);
    hb_bool_t           hb_ot_layout_table_choose_script    (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             const hb_tag_t *script_tags,
                                                             unsigned int *script_index,
                                                             hb_tag_t *chosen_script);
    hb_bool_t           hb_ot_layout_table_find_script      (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             hb_tag_t script_tag,
                                                             unsigned int *script_index);
    unsigned int        hb_ot_layout_table_get_feature_tags (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int start_offset,
                                                             unsigned int *feature_count,
                                                             hb_tag_t *feature_tags);
    unsigned int        hb_ot_layout_table_get_script_tags  (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int start_offset,
                                                             unsigned int *script_count,
                                                             hb_tag_t *script_tags);
    void                hb_ot_shape_plan_collect_lookups    (hb_shape_plan_t *shape_plan,
                                                             hb_tag_t table_tag,
                                                             hb_set_t *lookup_indexes);

## Description

## Details

### HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX

    #define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX ((unsigned int) 0xFFFF)

### HB_OT_LAYOUT_NO_FEATURE_INDEX

    #define HB_OT_LAYOUT_NO_FEATURE_INDEX		((unsigned int) 0xFFFF)

### HB_OT_LAYOUT_NO_SCRIPT_INDEX

    #define HB_OT_LAYOUT_NO_SCRIPT_INDEX		((unsigned int) 0xFFFF)

### HB_OT_TAG_GDEF

    #define HB_OT_TAG_GDEF HB_TAG('G','D','E','F')

### HB_OT_TAG_GPOS

    #define HB_OT_TAG_GPOS HB_TAG('G','P','O','S')

### HB_OT_TAG_GSUB

    #define HB_OT_TAG_GSUB HB_TAG('G','S','U','B')

### hb_ot_layout_collect_lookups ()

    void                hb_ot_layout_collect_lookups        (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             const hb_tag_t *scripts,
                                                             const hb_tag_t *languages,
                                                             const hb_tag_t *features,
                                                             hb_set_t *lookup_indexes);

### hb_ot_layout_feature_get_lookups ()

    unsigned int        hb_ot_layout_feature_get_lookups    (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int feature_index,
                                                             unsigned int start_offset,
                                                             unsigned int *lookup_count,
                                                             unsigned int *lookup_indexes);

### hb_ot_layout_get_attach_points ()

    unsigned int        hb_ot_layout_get_attach_points      (hb_face_t *face,
                                                             hb_codepoint_t glyph,
                                                             unsigned int start_offset,
                                                             unsigned int *point_count,
                                                             unsigned int *point_array);

### hb_ot_layout_get_glyph_class ()

    hb_ot_layout_glyph_class_t hb_ot_layout_get_glyph_class (hb_face_t *face,
                                                             hb_codepoint_t glyph);

### hb_ot_layout_get_glyphs_in_class ()

    void                hb_ot_layout_get_glyphs_in_class    (hb_face_t *face,
                                                             hb_ot_layout_glyph_class_t klass,
                                                             hb_set_t *glyphs);

### hb_ot_layout_get_ligature_carets ()

    unsigned int        hb_ot_layout_get_ligature_carets    (hb_font_t *font,
                                                             hb_direction_t direction,
                                                             hb_codepoint_t glyph,
                                                             unsigned int start_offset,
                                                             unsigned int *caret_count,
                                                             hb_position_t *caret_array);

### hb_ot_layout_get_size_params ()

    hb_bool_t           hb_ot_layout_get_size_params        (hb_face_t *face,
                                                             unsigned int *design_size,
                                                             unsigned int *subfamily_id,
                                                             unsigned int *subfamily_name_id,
                                                             unsigned int *range_start,
                                                             unsigned int *range_end);

### enum hb_ot_layout_glyph_class_t

    typedef enum {
      HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED = 0,
      HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH = 1,
      HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE = 2,
      HB_OT_LAYOUT_GLYPH_CLASS_MARK		= 3,
      HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT = 4
    } hb_ot_layout_glyph_class_t;

`HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED` |
`HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH` |
`HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE` |
`HB_OT_LAYOUT_GLYPH_CLASS_MARK` |
`HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT` |

### hb_ot_layout_glyph_sequence_func_t ()

    hb_bool_t           (*hb_ot_layout_glyph_sequence_func_t)
                                                            (hb_font_t *font,
                                                             hb_tag_t table_tag,
                                                             unsigned int lookup_index,
                                                             const hb_ot_layout_glyph_sequence_t *sequence,
                                                             void *user_data);

### hb_ot_layout_has_glyph_classes ()

    hb_bool_t           hb_ot_layout_has_glyph_classes      (hb_face_t *face);

### hb_ot_layout_has_positioning ()

    hb_bool_t           hb_ot_layout_has_positioning        (hb_face_t *face);

### hb_ot_layout_has_substitution ()

    hb_bool_t           hb_ot_layout_has_substitution       (hb_face_t *face);

### hb_ot_layout_language_find_feature ()

    hb_bool_t           hb_ot_layout_language_find_feature  (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int language_index,
                                                             hb_tag_t feature_tag,
                                                             unsigned int *feature_index);

### hb_ot_layout_language_get_feature_indexes ()

    unsigned int        hb_ot_layout_language_get_feature_indexes
                                                            (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int language_index,
                                                             unsigned int start_offset,
                                                             unsigned int *feature_count,
                                                             unsigned int *feature_indexes);

### hb_ot_layout_language_get_feature_tags ()

    unsigned int        hb_ot_layout_language_get_feature_tags
                                                            (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int language_index,
                                                             unsigned int start_offset,
                                                             unsigned int *feature_count,
                                                             hb_tag_t *feature_tags);

### hb_ot_layout_language_get_required_feature_index ()

    hb_bool_t           hb_ot_layout_language_get_required_feature_index
                                                            (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int language_index,
                                                             unsigned int *feature_index);

### hb_ot_layout_lookup_collect_glyphs ()

    void                hb_ot_layout_lookup_collect_glyphs  (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int lookup_index,
                                                             hb_set_t *glyphs_before,
                                                             hb_set_t *glyphs_input,
                                                             hb_set_t *glyphs_after,
                                                             hb_set_t *glyphs_output);

### hb_ot_layout_lookup_substitute_closure ()

    void                hb_ot_layout_lookup_substitute_closure
                                                            (hb_face_t *face,
                                                             unsigned int lookup_index,
                                                             hb_set_t *glyphs);

### hb_ot_layout_lookup_would_substitute ()

    hb_bool_t           hb_ot_layout_lookup_would_substitute
                                                            (hb_face_t *face,
                                                             unsigned int lookup_index,
                                                             const hb_codepoint_t *glyphs,
                                                             unsigned int glyphs_length,
                                                             hb_bool_t zero_context);

### hb_ot_layout_script_find_language ()

    hb_bool_t           hb_ot_layout_script_find_language   (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             hb_tag_t language_tag,
                                                             unsigned int *language_index);

### hb_ot_layout_script_get_language_tags ()

    unsigned int        hb_ot_layout_script_get_language_tags
                                                            (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int script_index,
                                                             unsigned int start_offset,
                                                             unsigned int *language_count,
                                                             hb_tag_t *language_tags);

### hb_ot_layout_table_choose_script ()

    hb_bool_t           hb_ot_layout_table_choose_script    (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             const hb_tag_t *script_tags,
                                                             unsigned int *script_index,
                                                             hb_tag_t *chosen_script);

### hb_ot_layout_table_find_script ()

    hb_bool_t           hb_ot_layout_table_find_script      (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             hb_tag_t script_tag,
                                                             unsigned int *script_index);

### hb_ot_layout_table_get_feature_tags ()

    unsigned int        hb_ot_layout_table_get_feature_tags (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int start_offset,
                                                             unsigned int *feature_count,
                                                             hb_tag_t *feature_tags);

### hb_ot_layout_table_get_script_tags ()

    unsigned int        hb_ot_layout_table_get_script_tags  (hb_face_t *face,
                                                             hb_tag_t table_tag,
                                                             unsigned int start_offset,
                                                             unsigned int *script_count,
                                                             hb_tag_t *script_tags);

### hb_ot_shape_plan_collect_lookups ()

    void                hb_ot_shape_plan_collect_lookups    (hb_shape_plan_t *shape_plan,
                                                             hb_tag_t table_tag,
                                                             hb_set_t *lookup_indexes);