tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

hb-ot-layout.h (19223B)


      1 /*
      2 * Copyright © 2007,2008,2009  Red Hat, Inc.
      3 *
      4 *  This is part of HarfBuzz, a text shaping library.
      5 *
      6 * Permission is hereby granted, without written agreement and without
      7 * license or royalty fees, to use, copy, modify, and distribute this
      8 * software and its documentation for any purpose, provided that the
      9 * above copyright notice and the following two paragraphs appear in
     10 * all copies of this software.
     11 *
     12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
     13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
     14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
     15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
     16 * DAMAGE.
     17 *
     18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
     19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
     20 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
     21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
     22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
     23 *
     24 * Red Hat Author(s): Behdad Esfahbod
     25 */
     26 
     27 #if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
     28 #error "Include <hb-ot.h> instead."
     29 #endif
     30 
     31 #ifndef HB_OT_LAYOUT_H
     32 #define HB_OT_LAYOUT_H
     33 
     34 #include "hb.h"
     35 
     36 #include "hb-ot-name.h"
     37 
     38 HB_BEGIN_DECLS
     39 
     40 
     41 /**
     42 * HB_OT_TAG_BASE:
     43 *
     44 * OpenType [Baseline Table](https://docs.microsoft.com/en-us/typography/opentype/spec/base).
     45 */
     46 #define HB_OT_TAG_BASE HB_TAG('B','A','S','E')
     47 /**
     48 * HB_OT_TAG_GDEF:
     49 *
     50 * OpenType [Glyph Definition Table](https://docs.microsoft.com/en-us/typography/opentype/spec/gdef).
     51 */
     52 #define HB_OT_TAG_GDEF HB_TAG('G','D','E','F')
     53 /**
     54 * HB_OT_TAG_GSUB:
     55 *
     56 * OpenType [Glyph Substitution Table](https://docs.microsoft.com/en-us/typography/opentype/spec/gsub).
     57 */
     58 #define HB_OT_TAG_GSUB HB_TAG('G','S','U','B')
     59 /**
     60 * HB_OT_TAG_GPOS:
     61 *
     62 * OpenType [Glyph Positioning Table](https://docs.microsoft.com/en-us/typography/opentype/spec/gpos).
     63 */
     64 #define HB_OT_TAG_GPOS HB_TAG('G','P','O','S')
     65 /**
     66 * HB_OT_TAG_JSTF:
     67 *
     68 * OpenType [Justification Table](https://docs.microsoft.com/en-us/typography/opentype/spec/jstf).
     69 */
     70 #define HB_OT_TAG_JSTF HB_TAG('J','S','T','F')
     71 
     72 
     73 /*
     74 * Script & Language tags.
     75 */
     76 
     77 /**
     78 * HB_OT_TAG_DEFAULT_SCRIPT:
     79 *
     80 * OpenType script tag, `DFLT`, for features that are not script-specific.
     81 *
     82 */
     83 #define HB_OT_TAG_DEFAULT_SCRIPT	HB_TAG ('D', 'F', 'L', 'T')
     84 /**
     85 * HB_OT_TAG_DEFAULT_LANGUAGE:
     86 *
     87 * OpenType language tag, `dflt`. Not a valid language tag, but some fonts
     88 * mistakenly use it.
     89 */
     90 #define HB_OT_TAG_DEFAULT_LANGUAGE	HB_TAG ('d', 'f', 'l', 't')
     91 
     92 /**
     93 * HB_OT_MAX_TAGS_PER_SCRIPT:
     94 *
     95 * Maximum number of OpenType tags that can correspond to a give #hb_script_t.
     96 *
     97 * Since: 2.0.0
     98 **/
     99 #define HB_OT_MAX_TAGS_PER_SCRIPT	3u
    100 /**
    101 * HB_OT_MAX_TAGS_PER_LANGUAGE:
    102 *
    103 * Maximum number of OpenType tags that can correspond to a give #hb_language_t.
    104 *
    105 * Since: 2.0.0
    106 **/
    107 #define HB_OT_MAX_TAGS_PER_LANGUAGE	3u
    108 
    109 HB_EXTERN void
    110 hb_ot_tags_from_script_and_language (hb_script_t   script,
    111 			     hb_language_t language,
    112 			     unsigned int *script_count /* IN/OUT */,
    113 			     hb_tag_t     *script_tags /* OUT */,
    114 			     unsigned int *language_count /* IN/OUT */,
    115 			     hb_tag_t     *language_tags /* OUT */);
    116 
    117 HB_EXTERN hb_script_t
    118 hb_ot_tag_to_script (hb_tag_t tag);
    119 
    120 HB_EXTERN hb_language_t
    121 hb_ot_tag_to_language (hb_tag_t tag);
    122 
    123 HB_EXTERN void
    124 hb_ot_tags_to_script_and_language (hb_tag_t       script_tag,
    125 			   hb_tag_t       language_tag,
    126 			   hb_script_t   *script /* OUT */,
    127 			   hb_language_t *language /* OUT */);
    128 
    129 
    130 /*
    131 * GDEF
    132 */
    133 
    134 HB_EXTERN hb_bool_t
    135 hb_ot_layout_has_glyph_classes (hb_face_t *face);
    136 
    137 /**
    138 * hb_ot_layout_glyph_class_t:
    139 * @HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED: Glyphs not matching the other classifications
    140 * @HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH: Spacing, single characters, capable of accepting marks
    141 * @HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE: Glyphs that represent ligation of multiple characters
    142 * @HB_OT_LAYOUT_GLYPH_CLASS_MARK: Non-spacing, combining glyphs that represent marks
    143 * @HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT: Spacing glyphs that represent part of a single character
    144 *
    145 * The GDEF classes defined for glyphs.
    146 *
    147 **/
    148 typedef enum {
    149  HB_OT_LAYOUT_GLYPH_CLASS_UNCLASSIFIED	= 0,
    150  HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH	= 1,
    151  HB_OT_LAYOUT_GLYPH_CLASS_LIGATURE	= 2,
    152  HB_OT_LAYOUT_GLYPH_CLASS_MARK		= 3,
    153  HB_OT_LAYOUT_GLYPH_CLASS_COMPONENT	= 4
    154 } hb_ot_layout_glyph_class_t;
    155 
    156 HB_EXTERN hb_ot_layout_glyph_class_t
    157 hb_ot_layout_get_glyph_class (hb_face_t      *face,
    158 		      hb_codepoint_t  glyph);
    159 
    160 HB_EXTERN void
    161 hb_ot_layout_get_glyphs_in_class (hb_face_t                  *face,
    162 			  hb_ot_layout_glyph_class_t  klass,
    163 			  hb_set_t                   *glyphs /* OUT */);
    164 
    165 /* Not that useful.  Provides list of attach points for a glyph that a
    166 * client may want to cache */
    167 HB_EXTERN unsigned int
    168 hb_ot_layout_get_attach_points (hb_face_t      *face,
    169 			hb_codepoint_t  glyph,
    170 			unsigned int    start_offset,
    171 			unsigned int   *point_count /* IN/OUT */,
    172 			unsigned int   *point_array /* OUT */);
    173 
    174 /* Ligature caret positions */
    175 HB_EXTERN unsigned int
    176 hb_ot_layout_get_ligature_carets (hb_font_t      *font,
    177 			  hb_direction_t  direction,
    178 			  hb_codepoint_t  glyph,
    179 			  unsigned int    start_offset,
    180 			  unsigned int   *caret_count /* IN/OUT */,
    181 			  hb_position_t  *caret_array /* OUT */);
    182 
    183 
    184 /*
    185 * GSUB/GPOS feature query and enumeration interface
    186 */
    187 
    188 /**
    189 * HB_OT_LAYOUT_NO_SCRIPT_INDEX:
    190 *
    191 * Special value for script index indicating unsupported script.
    192 */
    193 #define HB_OT_LAYOUT_NO_SCRIPT_INDEX		0xFFFFu
    194 /**
    195 * HB_OT_LAYOUT_NO_FEATURE_INDEX:
    196 *
    197 * Special value for feature index indicating unsupported feature.
    198 */
    199 #define HB_OT_LAYOUT_NO_FEATURE_INDEX		0xFFFFu
    200 /**
    201 * HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX:
    202 *
    203 * Special value for language index indicating default or unsupported language.
    204 */
    205 #define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX	0xFFFFu
    206 /**
    207 * HB_OT_LAYOUT_NO_VARIATIONS_INDEX:
    208 *
    209 * Special value for variations index indicating unsupported variation.
    210 */
    211 #define HB_OT_LAYOUT_NO_VARIATIONS_INDEX	0xFFFFFFFFu
    212 
    213 HB_EXTERN unsigned int
    214 hb_ot_layout_table_get_script_tags (hb_face_t    *face,
    215 			    hb_tag_t      table_tag,
    216 			    unsigned int  start_offset,
    217 			    unsigned int *script_count /* IN/OUT */,
    218 			    hb_tag_t     *script_tags /* OUT */);
    219 
    220 HB_EXTERN hb_bool_t
    221 hb_ot_layout_table_find_script (hb_face_t    *face,
    222 			hb_tag_t      table_tag,
    223 			hb_tag_t      script_tag,
    224 			unsigned int *script_index /* OUT */);
    225 
    226 HB_EXTERN hb_bool_t
    227 hb_ot_layout_table_select_script (hb_face_t      *face,
    228 			  hb_tag_t        table_tag,
    229 			  unsigned int    script_count,
    230 			  const hb_tag_t *script_tags,
    231 			  unsigned int   *script_index /* OUT */,
    232 			  hb_tag_t       *chosen_script /* OUT */);
    233 
    234 HB_EXTERN unsigned int
    235 hb_ot_layout_table_get_feature_tags (hb_face_t    *face,
    236 			     hb_tag_t      table_tag,
    237 			     unsigned int  start_offset,
    238 			     unsigned int *feature_count /* IN/OUT */,
    239 			     hb_tag_t     *feature_tags /* OUT */);
    240 
    241 HB_EXTERN unsigned int
    242 hb_ot_layout_script_get_language_tags (hb_face_t    *face,
    243 			       hb_tag_t      table_tag,
    244 			       unsigned int  script_index,
    245 			       unsigned int  start_offset,
    246 			       unsigned int *language_count /* IN/OUT */,
    247 			       hb_tag_t     *language_tags /* OUT */);
    248 
    249 HB_EXTERN hb_bool_t
    250 hb_ot_layout_script_select_language (hb_face_t      *face,
    251 			     hb_tag_t        table_tag,
    252 			     unsigned int    script_index,
    253 			     unsigned int    language_count,
    254 			     const hb_tag_t *language_tags,
    255 			     unsigned int   *language_index /* OUT */);
    256 
    257 HB_EXTERN hb_bool_t
    258 hb_ot_layout_script_select_language2 (hb_face_t      *face,
    259 			     hb_tag_t        table_tag,
    260 			     unsigned int    script_index,
    261 			     unsigned int    language_count,
    262 			     const hb_tag_t *language_tags,
    263 			     unsigned int   *language_index /* OUT */,
    264 			     hb_tag_t       *chosen_language /* OUT */);
    265 
    266 HB_EXTERN hb_bool_t
    267 hb_ot_layout_language_get_required_feature_index (hb_face_t    *face,
    268 					  hb_tag_t      table_tag,
    269 					  unsigned int  script_index,
    270 					  unsigned int  language_index,
    271 					  unsigned int *feature_index /* OUT */);
    272 
    273 HB_EXTERN hb_bool_t
    274 hb_ot_layout_language_get_required_feature (hb_face_t    *face,
    275 				    hb_tag_t      table_tag,
    276 				    unsigned int  script_index,
    277 				    unsigned int  language_index,
    278 				    unsigned int *feature_index /* OUT */,
    279 				    hb_tag_t     *feature_tag /* OUT */);
    280 
    281 HB_EXTERN unsigned int
    282 hb_ot_layout_language_get_feature_indexes (hb_face_t    *face,
    283 				   hb_tag_t      table_tag,
    284 				   unsigned int  script_index,
    285 				   unsigned int  language_index,
    286 				   unsigned int  start_offset,
    287 				   unsigned int *feature_count /* IN/OUT */,
    288 				   unsigned int *feature_indexes /* OUT */);
    289 
    290 HB_EXTERN unsigned int
    291 hb_ot_layout_language_get_feature_tags (hb_face_t    *face,
    292 				hb_tag_t      table_tag,
    293 				unsigned int  script_index,
    294 				unsigned int  language_index,
    295 				unsigned int  start_offset,
    296 				unsigned int *feature_count /* IN/OUT */,
    297 				hb_tag_t     *feature_tags /* OUT */);
    298 
    299 HB_EXTERN hb_bool_t
    300 hb_ot_layout_language_find_feature (hb_face_t    *face,
    301 			    hb_tag_t      table_tag,
    302 			    unsigned int  script_index,
    303 			    unsigned int  language_index,
    304 			    hb_tag_t      feature_tag,
    305 			    unsigned int *feature_index /* OUT */);
    306 
    307 HB_EXTERN unsigned int
    308 hb_ot_layout_feature_get_lookups (hb_face_t    *face,
    309 			  hb_tag_t      table_tag,
    310 			  unsigned int  feature_index,
    311 			  unsigned int  start_offset,
    312 			  unsigned int *lookup_count /* IN/OUT */,
    313 			  unsigned int *lookup_indexes /* OUT */);
    314 
    315 HB_EXTERN unsigned int
    316 hb_ot_layout_table_get_lookup_count (hb_face_t    *face,
    317 			     hb_tag_t      table_tag);
    318 
    319 HB_EXTERN void
    320 hb_ot_layout_collect_features (hb_face_t      *face,
    321 		       hb_tag_t        table_tag,
    322 		       const hb_tag_t *scripts,
    323 		       const hb_tag_t *languages,
    324 		       const hb_tag_t *features,
    325 		       hb_set_t       *feature_indexes /* OUT */);
    326 
    327 HB_EXTERN void
    328 hb_ot_layout_collect_features_map (hb_face_t      *face,
    329 			   hb_tag_t        table_tag,
    330 			   unsigned        script_index,
    331 			   unsigned        language_index,
    332 			   hb_map_t       *feature_map /* OUT */);
    333 
    334 HB_EXTERN void
    335 hb_ot_layout_collect_lookups (hb_face_t      *face,
    336 		      hb_tag_t        table_tag,
    337 		      const hb_tag_t *scripts,
    338 		      const hb_tag_t *languages,
    339 		      const hb_tag_t *features,
    340 		      hb_set_t       *lookup_indexes /* OUT */);
    341 
    342 HB_EXTERN void
    343 hb_ot_layout_lookup_collect_glyphs (hb_face_t    *face,
    344 			    hb_tag_t      table_tag,
    345 			    unsigned int  lookup_index,
    346 			    hb_set_t     *glyphs_before, /* OUT.  May be NULL */
    347 			    hb_set_t     *glyphs_input,  /* OUT.  May be NULL */
    348 			    hb_set_t     *glyphs_after,  /* OUT.  May be NULL */
    349 			    hb_set_t     *glyphs_output  /* OUT.  May be NULL */);
    350 
    351 
    352 /* Variations support */
    353 
    354 HB_EXTERN hb_bool_t
    355 hb_ot_layout_table_find_feature_variations (hb_face_t    *face,
    356 				    hb_tag_t      table_tag,
    357 				    const int    *coords,
    358 				    unsigned int  num_coords,
    359 				    unsigned int *variations_index /* out */);
    360 
    361 HB_EXTERN unsigned int
    362 hb_ot_layout_feature_with_variations_get_lookups (hb_face_t    *face,
    363 					  hb_tag_t      table_tag,
    364 					  unsigned int  feature_index,
    365 					  unsigned int  variations_index,
    366 					  unsigned int  start_offset,
    367 					  unsigned int *lookup_count /* IN/OUT */,
    368 					  unsigned int *lookup_indexes /* OUT */);
    369 
    370 
    371 /*
    372 * GSUB
    373 */
    374 
    375 HB_EXTERN hb_bool_t
    376 hb_ot_layout_has_substitution (hb_face_t *face);
    377 
    378 HB_EXTERN unsigned
    379 hb_ot_layout_lookup_get_glyph_alternates (hb_face_t      *face,
    380 				  unsigned        lookup_index,
    381 				  hb_codepoint_t  glyph,
    382 				  unsigned        start_offset,
    383 				  unsigned       *alternate_count /* IN/OUT */,
    384 				  hb_codepoint_t *alternate_glyphs /* OUT */);
    385 
    386 HB_EXTERN hb_bool_t
    387 hb_ot_layout_lookup_collect_glyph_alternates (hb_face_t *face,
    388 				      unsigned   lookup_index,
    389 				      hb_map_t  *alternate_count /* IN/OUT */,
    390 				      hb_map_t  *alternate_glyphs /* IN/OUT */);
    391 
    392 HB_EXTERN hb_bool_t
    393 hb_ot_layout_lookup_would_substitute (hb_face_t            *face,
    394 			      unsigned int          lookup_index,
    395 			      const hb_codepoint_t *glyphs,
    396 			      unsigned int          glyphs_length,
    397 			      hb_bool_t             zero_context);
    398 
    399 HB_EXTERN void
    400 hb_ot_layout_lookup_substitute_closure (hb_face_t    *face,
    401 				unsigned int  lookup_index,
    402 				hb_set_t     *glyphs
    403 				/*TODO , hb_bool_t  inclusive */);
    404 
    405 HB_EXTERN void
    406 hb_ot_layout_lookups_substitute_closure (hb_face_t      *face,
    407 				 const hb_set_t *lookups,
    408 				 hb_set_t       *glyphs);
    409 
    410 
    411 /*
    412 * GPOS
    413 */
    414 
    415 HB_EXTERN hb_bool_t
    416 hb_ot_layout_has_positioning (hb_face_t *face);
    417 
    418 /* Optical 'size' feature info.  Returns true if found.
    419 * https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#size */
    420 HB_EXTERN hb_bool_t
    421 hb_ot_layout_get_size_params (hb_face_t       *face,
    422 		      unsigned int    *design_size,       /* OUT.  May be NULL */
    423 		      unsigned int    *subfamily_id,      /* OUT.  May be NULL */
    424 		      hb_ot_name_id_t *subfamily_name_id, /* OUT.  May be NULL */
    425 		      unsigned int    *range_start,       /* OUT.  May be NULL */
    426 		      unsigned int    *range_end          /* OUT.  May be NULL */);
    427 
    428 HB_EXTERN hb_position_t
    429 hb_ot_layout_lookup_get_optical_bound (hb_font_t      *font,
    430 			       unsigned        lookup_index,
    431 			       hb_direction_t  direction,
    432 			       hb_codepoint_t  glyph);
    433 
    434 
    435 /*
    436 * GSUB/GPOS
    437 */
    438 
    439 HB_EXTERN hb_bool_t
    440 hb_ot_layout_feature_get_name_ids (hb_face_t       *face,
    441 			   hb_tag_t         table_tag,
    442 			   unsigned int     feature_index,
    443 			   hb_ot_name_id_t *label_id             /* OUT.  May be NULL */,
    444 			   hb_ot_name_id_t *tooltip_id           /* OUT.  May be NULL */,
    445 			   hb_ot_name_id_t *sample_id            /* OUT.  May be NULL */,
    446 			   unsigned int    *num_named_parameters /* OUT.  May be NULL */,
    447 			   hb_ot_name_id_t *first_param_id       /* OUT.  May be NULL */);
    448 
    449 
    450 HB_EXTERN unsigned int
    451 hb_ot_layout_feature_get_characters (hb_face_t      *face,
    452 			     hb_tag_t        table_tag,
    453 			     unsigned int    feature_index,
    454 			     unsigned int    start_offset,
    455 			     unsigned int   *char_count    /* IN/OUT.  May be NULL */,
    456 			     hb_codepoint_t *characters    /* OUT.     May be NULL */);
    457 
    458 
    459 /*
    460 * BASE
    461 */
    462 
    463 HB_EXTERN hb_bool_t
    464 hb_ot_layout_get_font_extents (hb_font_t         *font,
    465 		       hb_direction_t     direction,
    466 		       hb_tag_t           script_tag,
    467 		       hb_tag_t           language_tag,
    468 		       hb_font_extents_t *extents);
    469 
    470 HB_EXTERN hb_bool_t
    471 hb_ot_layout_get_font_extents2 (hb_font_t         *font,
    472 			hb_direction_t     direction,
    473 			hb_script_t        script,
    474 			hb_language_t      language,
    475 			hb_font_extents_t *extents);
    476 
    477 /**
    478 * hb_ot_layout_baseline_tag_t:
    479 * @HB_OT_LAYOUT_BASELINE_TAG_ROMAN: The baseline used by alphabetic scripts such as Latin, Cyrillic and Greek.
    480 * In vertical writing mode, the alphabetic baseline for characters rotated 90 degrees clockwise.
    481 * (This would not apply to alphabetic characters that remain upright in vertical writing mode, since these
    482 * characters are not rotated.)
    483 * @HB_OT_LAYOUT_BASELINE_TAG_HANGING: The hanging baseline. In horizontal direction, this is the horizontal
    484 * line from which syllables seem, to hang in Tibetan and other similar scripts. In vertical writing mode,
    485 * for Tibetan (or some other similar script) characters rotated 90 degrees clockwise.
    486 * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_BOTTOM_OR_LEFT: Ideographic character face bottom or left edge,
    487 * if the direction is horizontal or vertical, respectively.
    488 * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_TOP_OR_RIGHT: Ideographic character face top or right edge,
    489 * if the direction is horizontal or vertical, respectively.
    490 * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_CENTRAL: The center of the ideographic character face. Since: 4.0.0
    491 * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_BOTTOM_OR_LEFT: Ideographic em-box bottom or left edge,
    492 * if the direction is horizontal or vertical, respectively.
    493 * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_TOP_OR_RIGHT: Ideographic em-box top or right edge baseline,
    494 * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_CENTRAL: The center of the ideographic em-box. Since: 4.0.0
    495 * if the direction is horizontal or vertical, respectively.
    496 * @HB_OT_LAYOUT_BASELINE_TAG_MATH: The baseline about which mathematical characters are centered.
    497 * In vertical writing mode when mathematical characters rotated 90 degrees clockwise, are centered.
    498 *
    499 * Baseline tags from [Baseline Tags](https://docs.microsoft.com/en-us/typography/opentype/spec/baselinetags) registry.
    500 *
    501 * Since: 2.6.0
    502 */
    503 typedef enum {
    504  HB_OT_LAYOUT_BASELINE_TAG_ROMAN			= HB_TAG ('r','o','m','n'),
    505  HB_OT_LAYOUT_BASELINE_TAG_HANGING			= HB_TAG ('h','a','n','g'),
    506  HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_BOTTOM_OR_LEFT	= HB_TAG ('i','c','f','b'),
    507  HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_TOP_OR_RIGHT	= HB_TAG ('i','c','f','t'),
    508  HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_CENTRAL		= HB_TAG ('I','c','f','c'),
    509  HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_BOTTOM_OR_LEFT	= HB_TAG ('i','d','e','o'),
    510  HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_TOP_OR_RIGHT	= HB_TAG ('i','d','t','p'),
    511  HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_CENTRAL		= HB_TAG ('I','d','c','e'),
    512  HB_OT_LAYOUT_BASELINE_TAG_MATH			= HB_TAG ('m','a','t','h'),
    513 
    514  /*< private >*/
    515  _HB_OT_LAYOUT_BASELINE_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/
    516 } hb_ot_layout_baseline_tag_t;
    517 
    518 HB_EXTERN hb_ot_layout_baseline_tag_t
    519 hb_ot_layout_get_horizontal_baseline_tag_for_script (hb_script_t script);
    520 
    521 HB_EXTERN hb_bool_t
    522 hb_ot_layout_get_baseline (hb_font_t                   *font,
    523 		   hb_ot_layout_baseline_tag_t  baseline_tag,
    524 		   hb_direction_t               direction,
    525 		   hb_tag_t                     script_tag,
    526 		   hb_tag_t                     language_tag,
    527 		   hb_position_t               *coord        /* OUT.  May be NULL. */);
    528 
    529 HB_EXTERN hb_bool_t
    530 hb_ot_layout_get_baseline2 (hb_font_t                   *font,
    531 		    hb_ot_layout_baseline_tag_t  baseline_tag,
    532 		    hb_direction_t               direction,
    533 		    hb_script_t                  script,
    534 		    hb_language_t                language,
    535 		    hb_position_t               *coord        /* OUT.  May be NULL. */);
    536 
    537 HB_EXTERN void
    538 hb_ot_layout_get_baseline_with_fallback (hb_font_t                   *font,
    539 				 hb_ot_layout_baseline_tag_t  baseline_tag,
    540 				 hb_direction_t               direction,
    541 				 hb_tag_t                     script_tag,
    542 				 hb_tag_t                     language_tag,
    543 				 hb_position_t               *coord        /* OUT */);
    544 
    545 HB_EXTERN void
    546 hb_ot_layout_get_baseline_with_fallback2 (hb_font_t                   *font,
    547 				  hb_ot_layout_baseline_tag_t  baseline_tag,
    548 				  hb_direction_t               direction,
    549 				  hb_script_t                  script,
    550 				  hb_language_t                language,
    551 				  hb_position_t               *coord        /* OUT */);
    552 
    553 HB_END_DECLS
    554 
    555 #endif /* HB_OT_LAYOUT_H */