hb-ot-layout.h 19 KB

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