Behdad Esfahbod | 64aef3a | 2008-01-23 16:14:38 -0500 | [diff] [blame] | 1 | /* |
Behdad Esfahbod | 2409d5f | 2011-04-21 17:14:28 -0400 | [diff] [blame] | 2 | * Copyright © 2007,2008,2009 Red Hat, Inc. |
Behdad Esfahbod | 64aef3a | 2008-01-23 16:14:38 -0500 | [diff] [blame] | 3 | * |
Behdad Esfahbod | c755cb3 | 2010-04-22 00:11:43 -0400 | [diff] [blame] | 4 | * This is part of HarfBuzz, a text shaping library. |
Behdad Esfahbod | 64aef3a | 2008-01-23 16:14:38 -0500 | [diff] [blame] | 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 | |
Khaled Hosny | 7b9e23f | 2021-02-10 23:37:43 +0200 | [diff] [blame] | 27 | #if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR) |
Behdad Esfahbod | d1c9eb4 | 2012-04-12 13:17:44 -0400 | [diff] [blame] | 28 | #error "Include <hb-ot.h> instead." |
| 29 | #endif |
| 30 | |
Behdad Esfahbod | fd92a3d | 2008-01-24 03:11:09 -0500 | [diff] [blame] | 31 | #ifndef HB_OT_LAYOUT_H |
| 32 | #define HB_OT_LAYOUT_H |
Behdad Esfahbod | 12c4568 | 2006-12-28 06:10:59 -0500 | [diff] [blame] | 33 | |
Behdad Esfahbod | d1c9eb4 | 2012-04-12 13:17:44 -0400 | [diff] [blame] | 34 | #include "hb.h" |
Behdad Esfahbod | 12c4568 | 2006-12-28 06:10:59 -0500 | [diff] [blame] | 35 | |
Behdad Esfahbod | 477bc9a | 2018-10-12 15:52:31 -0400 | [diff] [blame] | 36 | #include "hb-ot-name.h" |
Behdad Esfahbod | 8a3511a | 2009-11-04 19:45:39 -0500 | [diff] [blame] | 37 | |
Behdad Esfahbod | f96ffd4 | 2009-05-24 15:01:16 -0400 | [diff] [blame] | 38 | HB_BEGIN_DECLS |
Behdad Esfahbod | 12c4568 | 2006-12-28 06:10:59 -0500 | [diff] [blame] | 39 | |
Behdad Esfahbod | acdba3f | 2010-07-23 15:11:18 -0400 | [diff] [blame] | 40 | |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 41 | /** |
| 42 | * HB_OT_TAG_BASE: |
| 43 | * |
| 44 | * OpenType [Baseline Table](https://docs.microsoft.com/en-us/typography/opentype/spec/base). |
| 45 | */ |
Behdad Esfahbod | 551fa2d | 2018-02-25 16:32:17 -0800 | [diff] [blame] | 46 | #define HB_OT_TAG_BASE HB_TAG('B','A','S','E') |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 47 | /** |
| 48 | * HB_OT_TAG_GDEF: |
| 49 | * |
| 50 | * OpenType [Glyph Definition Table](https://docs.microsoft.com/en-us/typography/opentype/spec/gdef). |
| 51 | */ |
Behdad Esfahbod | 0ead481 | 2009-08-02 17:41:36 -0400 | [diff] [blame] | 52 | #define HB_OT_TAG_GDEF HB_TAG('G','D','E','F') |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 53 | /** |
| 54 | * HB_OT_TAG_GSUB: |
| 55 | * |
| 56 | * OpenType [Glyph Substitution Table](https://docs.microsoft.com/en-us/typography/opentype/spec/gsub). |
| 57 | */ |
Behdad Esfahbod | 0ead481 | 2009-08-02 17:41:36 -0400 | [diff] [blame] | 58 | #define HB_OT_TAG_GSUB HB_TAG('G','S','U','B') |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 59 | /** |
| 60 | * HB_OT_TAG_GPOS: |
| 61 | * |
| 62 | * OpenType [Glyph Positioning Table](https://docs.microsoft.com/en-us/typography/opentype/spec/gpos). |
| 63 | */ |
Behdad Esfahbod | 0ead481 | 2009-08-02 17:41:36 -0400 | [diff] [blame] | 64 | #define HB_OT_TAG_GPOS HB_TAG('G','P','O','S') |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 65 | /** |
| 66 | * HB_OT_TAG_JSTF: |
| 67 | * |
| 68 | * OpenType [Justification Table](https://docs.microsoft.com/en-us/typography/opentype/spec/jstf). |
| 69 | */ |
Behdad Esfahbod | 6c48f20 | 2013-09-09 15:43:10 -0400 | [diff] [blame] | 70 | #define HB_OT_TAG_JSTF HB_TAG('J','S','T','F') |
Behdad Esfahbod | fd92a3d | 2008-01-24 03:11:09 -0500 | [diff] [blame] | 71 | |
Behdad Esfahbod | cfe9882 | 2012-07-27 03:06:30 -0400 | [diff] [blame] | 72 | |
Behdad Esfahbod | 590d55c | 2008-01-24 19:13:50 -0500 | [diff] [blame] | 73 | /* |
Behdad Esfahbod | 46072b7 | 2018-10-27 04:21:20 -0700 | [diff] [blame] | 74 | * Script & Language tags. |
| 75 | */ |
| 76 | |
Khaled Hosny | 3ba1e7e | 2020-12-31 17:11:35 +0200 | [diff] [blame] | 77 | /** |
| 78 | * HB_OT_TAG_DEFAULT_SCRIPT: |
| 79 | * |
| 80 | * OpenType script tag, `DFLT`, for features that are not script-specific. |
| 81 | * |
| 82 | */ |
Behdad Esfahbod | 46072b7 | 2018-10-27 04:21:20 -0700 | [diff] [blame] | 83 | #define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T') |
Khaled Hosny | 3ba1e7e | 2020-12-31 17:11:35 +0200 | [diff] [blame] | 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 | */ |
Behdad Esfahbod | 46072b7 | 2018-10-27 04:21:20 -0700 | [diff] [blame] | 90 | #define HB_OT_TAG_DEFAULT_LANGUAGE HB_TAG ('d', 'f', 'l', 't') |
| 91 | |
| 92 | /** |
| 93 | * HB_OT_MAX_TAGS_PER_SCRIPT: |
| 94 | * |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 95 | * Maximum number of OpenType tags that can correspond to a give #hb_script_t. |
| 96 | * |
Behdad Esfahbod | 46072b7 | 2018-10-27 04:21:20 -0700 | [diff] [blame] | 97 | * Since: 2.0.0 |
| 98 | **/ |
| 99 | #define HB_OT_MAX_TAGS_PER_SCRIPT 3u |
| 100 | /** |
| 101 | * HB_OT_MAX_TAGS_PER_LANGUAGE: |
| 102 | * |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 103 | * Maximum number of OpenType tags that can correspond to a give #hb_language_t. |
| 104 | * |
Behdad Esfahbod | 46072b7 | 2018-10-27 04:21:20 -0700 | [diff] [blame] | 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 | /* |
Behdad Esfahbod | 590d55c | 2008-01-24 19:13:50 -0500 | [diff] [blame] | 131 | * GDEF |
| 132 | */ |
| 133 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 134 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | b4b4272 | 2009-11-06 17:46:33 -0500 | [diff] [blame] | 135 | hb_ot_layout_has_glyph_classes (hb_face_t *face); |
Behdad Esfahbod | 590d55c | 2008-01-24 19:13:50 -0500 | [diff] [blame] | 136 | |
Nathan Willis | 930f6fc | 2019-03-16 15:10:21 +0000 | [diff] [blame] | 137 | /** |
Behdad Esfahbod | 81b79df | 2019-05-11 00:53:52 -0700 | [diff] [blame] | 138 | * hb_ot_layout_glyph_class_t: |
Nathan Willis | 3449031 | 2019-03-16 15:38:08 +0000 | [diff] [blame] | 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 |
Nathan Willis | 930f6fc | 2019-03-16 15:10:21 +0000 | [diff] [blame] | 144 | * |
Nathan Willis | 3449031 | 2019-03-16 15:38:08 +0000 | [diff] [blame] | 145 | * The GDEF classes defined for glyphs. |
Nathan Willis | 930f6fc | 2019-03-16 15:10:21 +0000 | [diff] [blame] | 146 | * |
| 147 | **/ |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 148 | typedef enum { |
Behdad Esfahbod | 5a08ecf | 2012-11-16 13:34:29 -0800 | [diff] [blame] | 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 |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 154 | } hb_ot_layout_glyph_class_t; |
| 155 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 156 | HB_EXTERN hb_ot_layout_glyph_class_t |
Behdad Esfahbod | 5a08ecf | 2012-11-16 13:34:29 -0800 | [diff] [blame] | 157 | hb_ot_layout_get_glyph_class (hb_face_t *face, |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 158 | hb_codepoint_t glyph); |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 159 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 160 | HB_EXTERN void |
Behdad Esfahbod | 89ca8ee | 2012-11-16 13:53:40 -0800 | [diff] [blame] | 161 | hb_ot_layout_get_glyphs_in_class (hb_face_t *face, |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 162 | hb_ot_layout_glyph_class_t klass, |
| 163 | hb_set_t *glyphs /* OUT */); |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 164 | |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 165 | /* Not that useful. Provides list of attach points for a glyph that a |
| 166 | * client may want to cache */ |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 167 | HB_EXTERN unsigned int |
Behdad Esfahbod | 0ead481 | 2009-08-02 17:41:36 -0400 | [diff] [blame] | 168 | hb_ot_layout_get_attach_points (hb_face_t *face, |
Behdad Esfahbod | 79420ad | 2009-05-26 12:24:16 -0400 | [diff] [blame] | 169 | hb_codepoint_t glyph, |
Behdad Esfahbod | e21899b | 2009-11-04 16:36:14 -0500 | [diff] [blame] | 170 | unsigned int start_offset, |
Behdad Esfahbod | 79420ad | 2009-05-26 12:24:16 -0400 | [diff] [blame] | 171 | unsigned int *point_count /* IN/OUT */, |
| 172 | unsigned int *point_array /* OUT */); |
| 173 | |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 174 | /* Ligature caret positions */ |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 175 | HB_EXTERN unsigned int |
Behdad Esfahbod | e204674 | 2010-10-27 12:32:02 -0400 | [diff] [blame] | 176 | hb_ot_layout_get_ligature_carets (hb_font_t *font, |
Behdad Esfahbod | e204674 | 2010-10-27 12:32:02 -0400 | [diff] [blame] | 177 | hb_direction_t direction, |
| 178 | hb_codepoint_t glyph, |
| 179 | unsigned int start_offset, |
| 180 | unsigned int *caret_count /* IN/OUT */, |
Behdad Esfahbod | 60fbb36 | 2011-05-19 18:46:15 -0400 | [diff] [blame] | 181 | hb_position_t *caret_array /* OUT */); |
Behdad Esfahbod | 62964af | 2009-05-26 12:40:10 -0400 | [diff] [blame] | 182 | |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 183 | |
Behdad Esfahbod | 706ab25 | 2008-01-28 05:58:50 -0500 | [diff] [blame] | 184 | /* |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 185 | * GSUB/GPOS feature query and enumeration interface |
Behdad Esfahbod | 706ab25 | 2008-01-28 05:58:50 -0500 | [diff] [blame] | 186 | */ |
| 187 | |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 188 | /** |
| 189 | * HB_OT_LAYOUT_NO_SCRIPT_INDEX: |
| 190 | * |
| 191 | * Special value for script index indicating unsupported script. |
| 192 | */ |
Behdad Esfahbod | 7627100 | 2014-07-11 14:54:42 -0400 | [diff] [blame] | 193 | #define HB_OT_LAYOUT_NO_SCRIPT_INDEX 0xFFFFu |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 194 | /** |
| 195 | * HB_OT_LAYOUT_NO_FEATURE_INDEX: |
| 196 | * |
| 197 | * Special value for feature index indicating unsupported feature. |
| 198 | */ |
Behdad Esfahbod | 7627100 | 2014-07-11 14:54:42 -0400 | [diff] [blame] | 199 | #define HB_OT_LAYOUT_NO_FEATURE_INDEX 0xFFFFu |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 200 | /** |
| 201 | * HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX: |
| 202 | * |
| 203 | * Special value for language index indicating default or unsupported language. |
| 204 | */ |
Behdad Esfahbod | 7627100 | 2014-07-11 14:54:42 -0400 | [diff] [blame] | 205 | #define HB_OT_LAYOUT_DEFAULT_LANGUAGE_INDEX 0xFFFFu |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 206 | /** |
| 207 | * HB_OT_LAYOUT_NO_VARIATIONS_INDEX: |
| 208 | * |
| 209 | * Special value for variations index indicating unsupported variation. |
| 210 | */ |
Behdad Esfahbod | 30c42b6 | 2016-09-10 03:32:39 -0700 | [diff] [blame] | 211 | #define HB_OT_LAYOUT_NO_VARIATIONS_INDEX 0xFFFFFFFFu |
Behdad Esfahbod | 706ab25 | 2008-01-28 05:58:50 -0500 | [diff] [blame] | 212 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 213 | HB_EXTERN unsigned int |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 214 | hb_ot_layout_table_get_script_tags (hb_face_t *face, |
| 215 | hb_tag_t table_tag, |
Behdad Esfahbod | e21899b | 2009-11-04 16:36:14 -0500 | [diff] [blame] | 216 | unsigned int start_offset, |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 217 | unsigned int *script_count /* IN/OUT */, |
| 218 | hb_tag_t *script_tags /* OUT */); |
Behdad Esfahbod | 706ab25 | 2008-01-28 05:58:50 -0500 | [diff] [blame] | 219 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 220 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | 0ead481 | 2009-08-02 17:41:36 -0400 | [diff] [blame] | 221 | hb_ot_layout_table_find_script (hb_face_t *face, |
| 222 | hb_tag_t table_tag, |
| 223 | hb_tag_t script_tag, |
Evgeniy Reizner | b4377af | 2020-01-31 15:11:45 +0200 | [diff] [blame] | 224 | unsigned int *script_index /* OUT */); |
Behdad Esfahbod | 706ab25 | 2008-01-28 05:58:50 -0500 | [diff] [blame] | 225 | |
David Corbett | 9106771 | 2017-12-08 11:21:14 -0500 | [diff] [blame] | 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 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 234 | HB_EXTERN unsigned int |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 235 | hb_ot_layout_table_get_feature_tags (hb_face_t *face, |
| 236 | hb_tag_t table_tag, |
Behdad Esfahbod | e21899b | 2009-11-04 16:36:14 -0500 | [diff] [blame] | 237 | unsigned int start_offset, |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 238 | unsigned int *feature_count /* IN/OUT */, |
| 239 | hb_tag_t *feature_tags /* OUT */); |
Behdad Esfahbod | 706ab25 | 2008-01-28 05:58:50 -0500 | [diff] [blame] | 240 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 241 | HB_EXTERN unsigned int |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 242 | hb_ot_layout_script_get_language_tags (hb_face_t *face, |
| 243 | hb_tag_t table_tag, |
| 244 | unsigned int script_index, |
Behdad Esfahbod | e21899b | 2009-11-04 16:36:14 -0500 | [diff] [blame] | 245 | unsigned int start_offset, |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 246 | unsigned int *language_count /* IN/OUT */, |
| 247 | hb_tag_t *language_tags /* OUT */); |
Behdad Esfahbod | 4a26ea4 | 2008-01-28 07:40:10 -0500 | [diff] [blame] | 248 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 249 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | cf975ac | 2018-10-11 14:07:44 -0400 | [diff] [blame] | 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 */); |
David Corbett | 9106771 | 2017-12-08 11:21:14 -0500 | [diff] [blame] | 256 | |
| 257 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | edec894 | 2023-01-20 09:28:59 -0700 | [diff] [blame] | 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 |
Behdad Esfahbod | 911ca38 | 2014-06-24 10:20:36 -0600 | [diff] [blame] | 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, |
Evgeniy Reizner | b4377af | 2020-01-31 15:11:45 +0200 | [diff] [blame] | 271 | unsigned int *feature_index /* OUT */); |
Behdad Esfahbod | 911ca38 | 2014-06-24 10:20:36 -0600 | [diff] [blame] | 272 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 273 | HB_EXTERN hb_bool_t |
Jonathan Kew | da13293 | 2014-04-27 14:05:24 +0100 | [diff] [blame] | 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, |
Evgeniy Reizner | b4377af | 2020-01-31 15:11:45 +0200 | [diff] [blame] | 278 | unsigned int *feature_index /* OUT */, |
| 279 | hb_tag_t *feature_tag /* OUT */); |
Behdad Esfahbod | c447335 | 2008-02-18 21:14:23 -0500 | [diff] [blame] | 280 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 281 | HB_EXTERN unsigned int |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 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, |
Behdad Esfahbod | e21899b | 2009-11-04 16:36:14 -0500 | [diff] [blame] | 286 | unsigned int start_offset, |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 287 | unsigned int *feature_count /* IN/OUT */, |
| 288 | unsigned int *feature_indexes /* OUT */); |
Behdad Esfahbod | 4a26ea4 | 2008-01-28 07:40:10 -0500 | [diff] [blame] | 289 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 290 | HB_EXTERN unsigned int |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 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, |
Behdad Esfahbod | e21899b | 2009-11-04 16:36:14 -0500 | [diff] [blame] | 295 | unsigned int start_offset, |
Behdad Esfahbod | bff3c0f | 2009-08-07 19:46:30 -0400 | [diff] [blame] | 296 | unsigned int *feature_count /* IN/OUT */, |
| 297 | hb_tag_t *feature_tags /* OUT */); |
Behdad Esfahbod | 4a26ea4 | 2008-01-28 07:40:10 -0500 | [diff] [blame] | 298 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 299 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | 0ead481 | 2009-08-02 17:41:36 -0400 | [diff] [blame] | 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, |
Evgeniy Reizner | b4377af | 2020-01-31 15:11:45 +0200 | [diff] [blame] | 305 | unsigned int *feature_index /* OUT */); |
Behdad Esfahbod | c447335 | 2008-02-18 21:14:23 -0500 | [diff] [blame] | 306 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 307 | HB_EXTERN unsigned int |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 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 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 315 | HB_EXTERN unsigned int |
Behdad Esfahbod | 27674b4 | 2013-10-03 14:54:50 -0400 | [diff] [blame] | 316 | hb_ot_layout_table_get_lookup_count (hb_face_t *face, |
| 317 | hb_tag_t table_tag); |
| 318 | |
Garret Rieger | 7d92bef | 2018-07-30 17:17:43 -0700 | [diff] [blame] | 319 | HB_EXTERN void |
| 320 | hb_ot_layout_collect_features (hb_face_t *face, |
Ebrahim Byagowi | a0b4ac4 | 2019-08-24 17:57:14 +0430 | [diff] [blame] | 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 */); |
Behdad Esfahbod | 27674b4 | 2013-10-03 14:54:50 -0400 | [diff] [blame] | 326 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 327 | HB_EXTERN void |
Behdad Esfahbod | dc35a0f | 2023-07-30 16:32:11 -0600 | [diff] [blame] | 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 |
Behdad Esfahbod | a88e716 | 2012-11-24 02:31:02 -0500 | [diff] [blame] | 335 | hb_ot_layout_collect_lookups (hb_face_t *face, |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 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 */); |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 341 | |
Qunxin Liu | 8ffc9ad | 2019-10-31 15:59:02 -0700 | [diff] [blame] | 342 | HB_EXTERN void |
Behdad Esfahbod | e8cfdd7 | 2012-11-16 19:07:06 -0800 | [diff] [blame] | 343 | hb_ot_layout_lookup_collect_glyphs (hb_face_t *face, |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 344 | hb_tag_t table_tag, |
| 345 | unsigned int lookup_index, |
Ebrahim Byagowi | 6310943 | 2018-10-13 14:00:05 +0330 | [diff] [blame] | 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 */); |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 350 | |
Behdad Esfahbod | c447335 | 2008-02-18 21:14:23 -0500 | [diff] [blame] | 351 | |
Behdad Esfahbod | 30c42b6 | 2016-09-10 03:32:39 -0700 | [diff] [blame] | 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 | |
Behdad Esfahbod | ec87ba9 | 2016-09-10 03:53:11 -0700 | [diff] [blame] | 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 | |
Behdad Esfahbod | 706ab25 | 2008-01-28 05:58:50 -0500 | [diff] [blame] | 370 | |
Behdad Esfahbod | 2d15e72 | 2009-04-15 19:50:16 -0400 | [diff] [blame] | 371 | /* |
| 372 | * GSUB |
| 373 | */ |
| 374 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 375 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | 0ead481 | 2009-08-02 17:41:36 -0400 | [diff] [blame] | 376 | hb_ot_layout_has_substitution (hb_face_t *face); |
Behdad Esfahbod | f9cd101 | 2009-07-28 15:43:34 -0400 | [diff] [blame] | 377 | |
Behdad Esfahbod | e13aaaa | 2020-06-18 15:22:54 -0700 | [diff] [blame] | 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 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 386 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | 362a990 | 2012-11-15 14:57:31 -0800 | [diff] [blame] | 387 | hb_ot_layout_lookup_would_substitute (hb_face_t *face, |
Behdad Esfahbod | d9b204d | 2012-08-23 16:22:28 -0400 | [diff] [blame] | 388 | unsigned int lookup_index, |
Behdad Esfahbod | e72b360 | 2012-07-19 14:35:23 -0400 | [diff] [blame] | 389 | const hb_codepoint_t *glyphs, |
| 390 | unsigned int glyphs_length, |
Behdad Esfahbod | d9b204d | 2012-08-23 16:22:28 -0400 | [diff] [blame] | 391 | hb_bool_t zero_context); |
Behdad Esfahbod | e72b360 | 2012-07-19 14:35:23 -0400 | [diff] [blame] | 392 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 393 | HB_EXTERN void |
Behdad Esfahbod | 362a990 | 2012-11-15 14:57:31 -0800 | [diff] [blame] | 394 | hb_ot_layout_lookup_substitute_closure (hb_face_t *face, |
Ebrahim Byagowi | a0b4ac4 | 2019-08-24 17:57:14 +0430 | [diff] [blame] | 395 | unsigned int lookup_index, |
| 396 | hb_set_t *glyphs |
Behdad Esfahbod | f306410 | 2012-11-15 18:39:46 -0800 | [diff] [blame] | 397 | /*TODO , hb_bool_t inclusive */); |
| 398 | |
Garret Rieger | 57badad | 2018-06-06 16:02:51 -0700 | [diff] [blame] | 399 | HB_EXTERN void |
| 400 | hb_ot_layout_lookups_substitute_closure (hb_face_t *face, |
Ebrahim Byagowi | a0b4ac4 | 2019-08-24 17:57:14 +0430 | [diff] [blame] | 401 | const hb_set_t *lookups, |
| 402 | hb_set_t *glyphs); |
Garret Rieger | 57badad | 2018-06-06 16:02:51 -0700 | [diff] [blame] | 403 | |
| 404 | |
Behdad Esfahbod | f9cd101 | 2009-07-28 15:43:34 -0400 | [diff] [blame] | 405 | /* |
| 406 | * GPOS |
| 407 | */ |
| 408 | |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 409 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | 0ead481 | 2009-08-02 17:41:36 -0400 | [diff] [blame] | 410 | hb_ot_layout_has_positioning (hb_face_t *face); |
Behdad Esfahbod | f9cd101 | 2009-07-28 15:43:34 -0400 | [diff] [blame] | 411 | |
Behdad Esfahbod | e9ad71d | 2012-11-30 08:10:26 +0200 | [diff] [blame] | 412 | /* Optical 'size' feature info. Returns true if found. |
Ebrahim Byagowi | f24b0b9 | 2018-04-12 13:40:45 +0430 | [diff] [blame] | 413 | * https://docs.microsoft.com/en-us/typography/opentype/spec/features_pt#size */ |
Chun-wei Fan | 835bbdc | 2015-11-19 18:34:12 +0800 | [diff] [blame] | 414 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | a7aba99 | 2018-10-30 14:04:09 -0700 | [diff] [blame] | 415 | hb_ot_layout_get_size_params (hb_face_t *face, |
| 416 | unsigned int *design_size, /* OUT. May be NULL */ |
| 417 | unsigned int *subfamily_id, /* OUT. May be NULL */ |
| 418 | hb_ot_name_id_t *subfamily_name_id, /* OUT. May be NULL */ |
| 419 | unsigned int *range_start, /* OUT. May be NULL */ |
| 420 | unsigned int *range_end /* OUT. May be NULL */); |
Behdad Esfahbod | f54cce3 | 2012-11-26 14:02:31 +0200 | [diff] [blame] | 421 | |
Behdad Esfahbod | 5d6f1a8 | 2022-08-31 08:31:24 -0600 | [diff] [blame] | 422 | HB_EXTERN hb_position_t |
Behdad Esfahbod | 71c6cba | 2022-09-01 13:43:19 -0600 | [diff] [blame] | 423 | hb_ot_layout_lookup_get_optical_bound (hb_font_t *font, |
| 424 | unsigned lookup_index, |
| 425 | hb_direction_t direction, |
| 426 | hb_codepoint_t glyph); |
Behdad Esfahbod | 5d6f1a8 | 2022-08-31 08:31:24 -0600 | [diff] [blame] | 427 | |
Ebrahim Byagowi | 6310943 | 2018-10-13 14:00:05 +0330 | [diff] [blame] | 428 | |
Behdad Esfahbod | 71c6cba | 2022-09-01 13:43:19 -0600 | [diff] [blame] | 429 | /* |
| 430 | * GSUB/GPOS |
| 431 | */ |
| 432 | |
Ebrahim Byagowi | dc49bd8 | 2018-10-12 03:00:59 +0330 | [diff] [blame] | 433 | HB_EXTERN hb_bool_t |
Behdad Esfahbod | a7aba99 | 2018-10-30 14:04:09 -0700 | [diff] [blame] | 434 | hb_ot_layout_feature_get_name_ids (hb_face_t *face, |
| 435 | hb_tag_t table_tag, |
| 436 | unsigned int feature_index, |
| 437 | hb_ot_name_id_t *label_id /* OUT. May be NULL */, |
| 438 | hb_ot_name_id_t *tooltip_id /* OUT. May be NULL */, |
| 439 | hb_ot_name_id_t *sample_id /* OUT. May be NULL */, |
| 440 | unsigned int *num_named_parameters /* OUT. May be NULL */, |
| 441 | hb_ot_name_id_t *first_param_id /* OUT. May be NULL */); |
Ebrahim Byagowi | dc49bd8 | 2018-10-12 03:00:59 +0330 | [diff] [blame] | 442 | |
| 443 | |
| 444 | HB_EXTERN unsigned int |
| 445 | hb_ot_layout_feature_get_characters (hb_face_t *face, |
| 446 | hb_tag_t table_tag, |
| 447 | unsigned int feature_index, |
Ebrahim Byagowi | dc49bd8 | 2018-10-12 03:00:59 +0330 | [diff] [blame] | 448 | unsigned int start_offset, |
| 449 | unsigned int *char_count /* IN/OUT. May be NULL */, |
| 450 | hb_codepoint_t *characters /* OUT. May be NULL */); |
Behdad Esfahbod | 2d15e72 | 2009-04-15 19:50:16 -0400 | [diff] [blame] | 451 | |
Behdad Esfahbod | 71c6cba | 2022-09-01 13:43:19 -0600 | [diff] [blame] | 452 | |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 453 | /* |
| 454 | * BASE |
| 455 | */ |
| 456 | |
Behdad Esfahbod | 3e110c6 | 2023-05-19 11:06:26 -0600 | [diff] [blame] | 457 | HB_EXTERN hb_bool_t |
| 458 | hb_ot_layout_get_font_extents (hb_font_t *font, |
Behdad Esfahbod | 0894813 | 2023-05-19 11:30:03 -0600 | [diff] [blame] | 459 | hb_direction_t direction, |
| 460 | hb_tag_t script_tag, |
| 461 | hb_tag_t language_tag, |
| 462 | hb_font_extents_t *extents); |
| 463 | |
| 464 | HB_EXTERN hb_bool_t |
| 465 | hb_ot_layout_get_font_extents2 (hb_font_t *font, |
| 466 | hb_direction_t direction, |
| 467 | hb_script_t script, |
| 468 | hb_language_t language, |
| 469 | hb_font_extents_t *extents); |
| 470 | |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 471 | /** |
| 472 | * hb_ot_layout_baseline_tag_t: |
Ebrahim Byagowi | 4d1872b | 2019-08-03 14:06:46 +0430 | [diff] [blame] | 473 | * @HB_OT_LAYOUT_BASELINE_TAG_ROMAN: The baseline used by alphabetic scripts such as Latin, Cyrillic and Greek. |
| 474 | * In vertical writing mode, the alphabetic baseline for characters rotated 90 degrees clockwise. |
| 475 | * (This would not apply to alphabetic characters that remain upright in vertical writing mode, since these |
| 476 | * characters are not rotated.) |
| 477 | * @HB_OT_LAYOUT_BASELINE_TAG_HANGING: The hanging baseline. In horizontal direction, this is the horizontal |
| 478 | * line from which syllables seem, to hang in Tibetan and other similar scripts. In vertical writing mode, |
| 479 | * for Tibetan (or some other similar script) characters rotated 90 degrees clockwise. |
| 480 | * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_BOTTOM_OR_LEFT: Ideographic character face bottom or left edge, |
| 481 | * if the direction is horizontal or vertical, respectively. |
| 482 | * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_TOP_OR_RIGHT: Ideographic character face top or right edge, |
| 483 | * if the direction is horizontal or vertical, respectively. |
Khaled Hosny | 8d1b000 | 2022-03-01 21:27:32 +0200 | [diff] [blame] | 484 | * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_CENTRAL: The center of the ideographic character face. Since: 4.0.0 |
Ebrahim Byagowi | 4d1872b | 2019-08-03 14:06:46 +0430 | [diff] [blame] | 485 | * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_BOTTOM_OR_LEFT: Ideographic em-box bottom or left edge, |
| 486 | * if the direction is horizontal or vertical, respectively. |
| 487 | * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_TOP_OR_RIGHT: Ideographic em-box top or right edge baseline, |
Khaled Hosny | 8d1b000 | 2022-03-01 21:27:32 +0200 | [diff] [blame] | 488 | * @HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_CENTRAL: The center of the ideographic em-box. Since: 4.0.0 |
Ebrahim Byagowi | 4d1872b | 2019-08-03 14:06:46 +0430 | [diff] [blame] | 489 | * if the direction is horizontal or vertical, respectively. |
| 490 | * @HB_OT_LAYOUT_BASELINE_TAG_MATH: The baseline about which mathematical characters are centered. |
| 491 | * In vertical writing mode when mathematical characters rotated 90 degrees clockwise, are centered. |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 492 | * |
Khaled Hosny | 8e8c3e5 | 2020-12-30 23:37:49 +0200 | [diff] [blame] | 493 | * Baseline tags from [Baseline Tags](https://docs.microsoft.com/en-us/typography/opentype/spec/baselinetags) registry. |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 494 | * |
Behdad Esfahbod | 6461143 | 2019-08-13 22:20:54 -0700 | [diff] [blame] | 495 | * Since: 2.6.0 |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 496 | */ |
| 497 | typedef enum { |
| 498 | HB_OT_LAYOUT_BASELINE_TAG_ROMAN = HB_TAG ('r','o','m','n'), |
| 499 | HB_OT_LAYOUT_BASELINE_TAG_HANGING = HB_TAG ('h','a','n','g'), |
| 500 | HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_BOTTOM_OR_LEFT = HB_TAG ('i','c','f','b'), |
| 501 | HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_TOP_OR_RIGHT = HB_TAG ('i','c','f','t'), |
Matthias Clasen | 95bb2ff | 2022-02-16 13:10:52 -0600 | [diff] [blame] | 502 | HB_OT_LAYOUT_BASELINE_TAG_IDEO_FACE_CENTRAL = HB_TAG ('I','c','f','c'), |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 503 | HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_BOTTOM_OR_LEFT = HB_TAG ('i','d','e','o'), |
| 504 | HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_TOP_OR_RIGHT = HB_TAG ('i','d','t','p'), |
Matthias Clasen | 95bb2ff | 2022-02-16 13:10:52 -0600 | [diff] [blame] | 505 | HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_CENTRAL = HB_TAG ('I','d','c','e'), |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 506 | HB_OT_LAYOUT_BASELINE_TAG_MATH = HB_TAG ('m','a','t','h'), |
| 507 | |
Khaled Hosny | a3fe43a | 2020-12-30 21:58:43 +0200 | [diff] [blame] | 508 | /*< private >*/ |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 509 | _HB_OT_LAYOUT_BASELINE_TAG_MAX_VALUE = HB_TAG_MAX_SIGNED /*< skip >*/ |
| 510 | } hb_ot_layout_baseline_tag_t; |
| 511 | |
Behdad Esfahbod | 9807910 | 2022-02-13 18:15:32 -0600 | [diff] [blame] | 512 | HB_EXTERN hb_ot_layout_baseline_tag_t |
| 513 | hb_ot_layout_get_horizontal_baseline_tag_for_script (hb_script_t script); |
| 514 | |
Ebrahim Byagowi | 9f2b495 | 2019-07-30 04:42:51 +0430 | [diff] [blame] | 515 | HB_EXTERN hb_bool_t |
| 516 | hb_ot_layout_get_baseline (hb_font_t *font, |
| 517 | hb_ot_layout_baseline_tag_t baseline_tag, |
| 518 | hb_direction_t direction, |
| 519 | hb_tag_t script_tag, |
| 520 | hb_tag_t language_tag, |
| 521 | hb_position_t *coord /* OUT. May be NULL. */); |
| 522 | |
Behdad Esfahbod | 0894813 | 2023-05-19 11:30:03 -0600 | [diff] [blame] | 523 | HB_EXTERN hb_bool_t |
| 524 | hb_ot_layout_get_baseline2 (hb_font_t *font, |
| 525 | hb_ot_layout_baseline_tag_t baseline_tag, |
| 526 | hb_direction_t direction, |
| 527 | hb_script_t script, |
| 528 | hb_language_t language, |
| 529 | hb_position_t *coord /* OUT. May be NULL. */); |
| 530 | |
Matthias Clasen | f81578f | 2022-02-13 19:15:36 -0600 | [diff] [blame] | 531 | HB_EXTERN void |
| 532 | hb_ot_layout_get_baseline_with_fallback (hb_font_t *font, |
| 533 | hb_ot_layout_baseline_tag_t baseline_tag, |
| 534 | hb_direction_t direction, |
| 535 | hb_tag_t script_tag, |
| 536 | hb_tag_t language_tag, |
| 537 | hb_position_t *coord /* OUT */); |
| 538 | |
Behdad Esfahbod | 0894813 | 2023-05-19 11:30:03 -0600 | [diff] [blame] | 539 | HB_EXTERN void |
| 540 | hb_ot_layout_get_baseline_with_fallback2 (hb_font_t *font, |
| 541 | hb_ot_layout_baseline_tag_t baseline_tag, |
| 542 | hb_direction_t direction, |
| 543 | hb_script_t script, |
| 544 | hb_language_t language, |
| 545 | hb_position_t *coord /* OUT */); |
| 546 | |
Behdad Esfahbod | f96ffd4 | 2009-05-24 15:01:16 -0400 | [diff] [blame] | 547 | HB_END_DECLS |
Behdad Esfahbod | 12c4568 | 2006-12-28 06:10:59 -0500 | [diff] [blame] | 548 | |
Behdad Esfahbod | fd92a3d | 2008-01-24 03:11:09 -0500 | [diff] [blame] | 549 | #endif /* HB_OT_LAYOUT_H */ |