hb-font.h 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153
  1. /*
  2. * Copyright © 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_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
  27. #error "Include <hb.h> instead."
  28. #endif
  29. #ifndef HB_FONT_H
  30. #define HB_FONT_H
  31. #include "hb-common.h"
  32. #include "hb-face.h"
  33. #include "hb-draw.h"
  34. #include "hb-paint.h"
  35. HB_BEGIN_DECLS
  36. /*
  37. * hb_font_funcs_t
  38. */
  39. /**
  40. * hb_font_funcs_t:
  41. *
  42. * Data type containing a set of virtual methods used for
  43. * working on #hb_font_t font objects.
  44. *
  45. * HarfBuzz provides a lightweight default function for each of
  46. * the methods in #hb_font_funcs_t. Client programs can implement
  47. * their own replacements for the individual font functions, as
  48. * needed, and replace the default by calling the setter for a
  49. * method.
  50. *
  51. **/
  52. typedef struct hb_font_funcs_t hb_font_funcs_t;
  53. HB_EXTERN hb_font_funcs_t *
  54. hb_font_funcs_create (void);
  55. HB_EXTERN hb_font_funcs_t *
  56. hb_font_funcs_get_empty (void);
  57. HB_EXTERN hb_font_funcs_t *
  58. hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
  59. HB_EXTERN void
  60. hb_font_funcs_destroy (hb_font_funcs_t *ffuncs);
  61. HB_EXTERN hb_bool_t
  62. hb_font_funcs_set_user_data (hb_font_funcs_t *ffuncs,
  63. hb_user_data_key_t *key,
  64. void * data,
  65. hb_destroy_func_t destroy,
  66. hb_bool_t replace);
  67. HB_EXTERN void *
  68. hb_font_funcs_get_user_data (const hb_font_funcs_t *ffuncs,
  69. hb_user_data_key_t *key);
  70. HB_EXTERN void
  71. hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
  72. HB_EXTERN hb_bool_t
  73. hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
  74. /* font extents */
  75. /**
  76. * hb_font_extents_t:
  77. * @ascender: The height of typographic ascenders.
  78. * @descender: The depth of typographic descenders.
  79. * @line_gap: The suggested line-spacing gap.
  80. *
  81. * Font-wide extent values, measured in font units.
  82. *
  83. * Note that typically @ascender is positive and @descender
  84. * negative, in coordinate systems that grow up.
  85. **/
  86. typedef struct hb_font_extents_t {
  87. hb_position_t ascender;
  88. hb_position_t descender;
  89. hb_position_t line_gap;
  90. /*< private >*/
  91. hb_position_t reserved9;
  92. hb_position_t reserved8;
  93. hb_position_t reserved7;
  94. hb_position_t reserved6;
  95. hb_position_t reserved5;
  96. hb_position_t reserved4;
  97. hb_position_t reserved3;
  98. hb_position_t reserved2;
  99. hb_position_t reserved1;
  100. } hb_font_extents_t;
  101. /* func types */
  102. /**
  103. * hb_font_get_font_extents_func_t:
  104. * @font: #hb_font_t to work upon
  105. * @font_data: @font user data pointer
  106. * @extents: (out): The font extents retrieved
  107. * @user_data: User data pointer passed by the caller
  108. *
  109. * This method should retrieve the extents for a font.
  110. *
  111. **/
  112. typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data,
  113. hb_font_extents_t *extents,
  114. void *user_data);
  115. /**
  116. * hb_font_get_font_h_extents_func_t:
  117. *
  118. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  119. *
  120. * This method should retrieve the extents for a font, for horizontal-direction
  121. * text segments. Extents must be returned in an #hb_glyph_extents output
  122. * parameter.
  123. *
  124. **/
  125. typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t;
  126. /**
  127. * hb_font_get_font_v_extents_func_t:
  128. *
  129. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  130. *
  131. * This method should retrieve the extents for a font, for vertical-direction
  132. * text segments. Extents must be returned in an #hb_glyph_extents output
  133. * parameter.
  134. *
  135. **/
  136. typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t;
  137. /**
  138. * hb_font_get_nominal_glyph_func_t:
  139. * @font: #hb_font_t to work upon
  140. * @font_data: @font user data pointer
  141. * @unicode: The Unicode code point to query
  142. * @glyph: (out): The glyph ID retrieved
  143. * @user_data: User data pointer passed by the caller
  144. *
  145. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  146. *
  147. * This method should retrieve the nominal glyph ID for a specified Unicode code
  148. * point. Glyph IDs must be returned in a #hb_codepoint_t output parameter.
  149. *
  150. * Return value: `true` if data found, `false` otherwise
  151. *
  152. **/
  153. typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data,
  154. hb_codepoint_t unicode,
  155. hb_codepoint_t *glyph,
  156. void *user_data);
  157. /**
  158. * hb_font_get_variation_glyph_func_t:
  159. * @font: #hb_font_t to work upon
  160. * @font_data: @font user data pointer
  161. * @unicode: The Unicode code point to query
  162. * @variation_selector: The variation-selector code point to query
  163. * @glyph: (out): The glyph ID retrieved
  164. * @user_data: User data pointer passed by the caller
  165. *
  166. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  167. *
  168. * This method should retrieve the glyph ID for a specified Unicode code point
  169. * followed by a specified Variation Selector code point. Glyph IDs must be
  170. * returned in a #hb_codepoint_t output parameter.
  171. *
  172. * Return value: `true` if data found, `false` otherwise
  173. *
  174. **/
  175. typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data,
  176. hb_codepoint_t unicode, hb_codepoint_t variation_selector,
  177. hb_codepoint_t *glyph,
  178. void *user_data);
  179. /**
  180. * hb_font_get_nominal_glyphs_func_t:
  181. * @font: #hb_font_t to work upon
  182. * @font_data: @font user data pointer
  183. * @count: number of code points to query
  184. * @first_unicode: The first Unicode code point to query
  185. * @unicode_stride: The stride between successive code points
  186. * @first_glyph: (out): The first glyph ID retrieved
  187. * @glyph_stride: The stride between successive glyph IDs
  188. * @user_data: User data pointer passed by the caller
  189. *
  190. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  191. *
  192. * This method should retrieve the nominal glyph IDs for a sequence of
  193. * Unicode code points. Glyph IDs must be returned in a #hb_codepoint_t
  194. * output parameter.
  195. *
  196. * Return value: the number of code points processed
  197. *
  198. **/
  199. typedef unsigned int (*hb_font_get_nominal_glyphs_func_t) (hb_font_t *font, void *font_data,
  200. unsigned int count,
  201. const hb_codepoint_t *first_unicode,
  202. unsigned int unicode_stride,
  203. hb_codepoint_t *first_glyph,
  204. unsigned int glyph_stride,
  205. void *user_data);
  206. /**
  207. * hb_font_get_glyph_advance_func_t:
  208. * @font: #hb_font_t to work upon
  209. * @font_data: @font user data pointer
  210. * @glyph: The glyph ID to query
  211. * @user_data: User data pointer passed by the caller
  212. *
  213. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  214. *
  215. * This method should retrieve the advance for a specified glyph. The
  216. * method must return an #hb_position_t.
  217. *
  218. * Return value: The advance of @glyph within @font
  219. *
  220. **/
  221. typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
  222. hb_codepoint_t glyph,
  223. void *user_data);
  224. /**
  225. * hb_font_get_glyph_h_advance_func_t:
  226. *
  227. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  228. *
  229. * This method should retrieve the advance for a specified glyph, in
  230. * horizontal-direction text segments. Advances must be returned in
  231. * an #hb_position_t output parameter.
  232. *
  233. **/
  234. typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t;
  235. /**
  236. * hb_font_get_glyph_v_advance_func_t:
  237. *
  238. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  239. *
  240. * This method should retrieve the advance for a specified glyph, in
  241. * vertical-direction text segments. Advances must be returned in
  242. * an #hb_position_t output parameter.
  243. *
  244. **/
  245. typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t;
  246. /**
  247. * hb_font_get_glyph_advances_func_t:
  248. * @font: #hb_font_t to work upon
  249. * @font_data: @font user data pointer
  250. * @count: The number of glyph IDs in the sequence queried
  251. * @first_glyph: The first glyph ID to query
  252. * @glyph_stride: The stride between successive glyph IDs
  253. * @first_advance: (out): The first advance retrieved
  254. * @advance_stride: The stride between successive advances
  255. * @user_data: User data pointer passed by the caller
  256. *
  257. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  258. *
  259. * This method should retrieve the advances for a sequence of glyphs.
  260. *
  261. **/
  262. typedef void (*hb_font_get_glyph_advances_func_t) (hb_font_t* font, void* font_data,
  263. unsigned int count,
  264. const hb_codepoint_t *first_glyph,
  265. unsigned glyph_stride,
  266. hb_position_t *first_advance,
  267. unsigned advance_stride,
  268. void *user_data);
  269. /**
  270. * hb_font_get_glyph_h_advances_func_t:
  271. *
  272. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  273. *
  274. * This method should retrieve the advances for a sequence of glyphs, in
  275. * horizontal-direction text segments.
  276. *
  277. **/
  278. typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_h_advances_func_t;
  279. /**
  280. * hb_font_get_glyph_v_advances_func_t:
  281. *
  282. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  283. *
  284. * This method should retrieve the advances for a sequence of glyphs, in
  285. * vertical-direction text segments.
  286. *
  287. **/
  288. typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_v_advances_func_t;
  289. /**
  290. * hb_font_get_glyph_origin_func_t:
  291. * @font: #hb_font_t to work upon
  292. * @font_data: @font user data pointer
  293. * @glyph: The glyph ID to query
  294. * @x: (out): The X coordinate of the origin
  295. * @y: (out): The Y coordinate of the origin
  296. * @user_data: User data pointer passed by the caller
  297. *
  298. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  299. *
  300. * This method should retrieve the (X,Y) coordinates (in font units) of the
  301. * origin for a glyph. Each coordinate must be returned in an #hb_position_t
  302. * output parameter.
  303. *
  304. * Return value: `true` if data found, `false` otherwise
  305. *
  306. **/
  307. typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data,
  308. hb_codepoint_t glyph,
  309. hb_position_t *x, hb_position_t *y,
  310. void *user_data);
  311. /**
  312. * hb_font_get_glyph_h_origin_func_t:
  313. *
  314. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  315. *
  316. * This method should retrieve the (X,Y) coordinates (in font units) of the
  317. * origin for a glyph, for horizontal-direction text segments. Each
  318. * coordinate must be returned in an #hb_position_t output parameter.
  319. *
  320. **/
  321. typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t;
  322. /**
  323. * hb_font_get_glyph_v_origin_func_t:
  324. *
  325. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  326. *
  327. * This method should retrieve the (X,Y) coordinates (in font units) of the
  328. * origin for a glyph, for vertical-direction text segments. Each coordinate
  329. * must be returned in an #hb_position_t output parameter.
  330. *
  331. **/
  332. typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t;
  333. /**
  334. * hb_font_get_glyph_kerning_func_t:
  335. * @font: #hb_font_t to work upon
  336. * @font_data: @font user data pointer
  337. * @first_glyph: The glyph ID of the first glyph in the glyph pair
  338. * @second_glyph: The glyph ID of the second glyph in the glyph pair
  339. * @user_data: User data pointer passed by the caller
  340. *
  341. * This method should retrieve the kerning-adjustment value for a glyph-pair in
  342. * the specified font, for horizontal text segments.
  343. *
  344. **/
  345. typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data,
  346. hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
  347. void *user_data);
  348. /**
  349. * hb_font_get_glyph_h_kerning_func_t:
  350. *
  351. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  352. *
  353. * This method should retrieve the kerning-adjustment value for a glyph-pair in
  354. * the specified font, for horizontal text segments.
  355. *
  356. **/
  357. typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t;
  358. /**
  359. * hb_font_get_glyph_extents_func_t:
  360. * @font: #hb_font_t to work upon
  361. * @font_data: @font user data pointer
  362. * @glyph: The glyph ID to query
  363. * @extents: (out): The #hb_glyph_extents_t retrieved
  364. * @user_data: User data pointer passed by the caller
  365. *
  366. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  367. *
  368. * This method should retrieve the extents for a specified glyph. Extents must be
  369. * returned in an #hb_glyph_extents output parameter.
  370. *
  371. * Return value: `true` if data found, `false` otherwise
  372. *
  373. **/
  374. typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
  375. hb_codepoint_t glyph,
  376. hb_glyph_extents_t *extents,
  377. void *user_data);
  378. /**
  379. * hb_font_get_glyph_contour_point_func_t:
  380. * @font: #hb_font_t to work upon
  381. * @font_data: @font user data pointer
  382. * @glyph: The glyph ID to query
  383. * @point_index: The contour-point index to query
  384. * @x: (out): The X value retrieved for the contour point
  385. * @y: (out): The Y value retrieved for the contour point
  386. * @user_data: User data pointer passed by the caller
  387. *
  388. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  389. *
  390. * This method should retrieve the (X,Y) coordinates (in font units) for a
  391. * specified contour point in a glyph. Each coordinate must be returned as
  392. * an #hb_position_t output parameter.
  393. *
  394. * Return value: `true` if data found, `false` otherwise
  395. *
  396. **/
  397. typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data,
  398. hb_codepoint_t glyph, unsigned int point_index,
  399. hb_position_t *x, hb_position_t *y,
  400. void *user_data);
  401. /**
  402. * hb_font_get_glyph_name_func_t:
  403. * @font: #hb_font_t to work upon
  404. * @font_data: @font user data pointer
  405. * @glyph: The glyph ID to query
  406. * @name: (out) (array length=size): Name string retrieved for the glyph ID
  407. * @size: Length of the glyph-name string retrieved
  408. * @user_data: User data pointer passed by the caller
  409. *
  410. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  411. *
  412. * This method should retrieve the glyph name that corresponds to a
  413. * glyph ID. The name should be returned in a string output parameter.
  414. *
  415. * Return value: `true` if data found, `false` otherwise
  416. *
  417. **/
  418. typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data,
  419. hb_codepoint_t glyph,
  420. char *name, unsigned int size,
  421. void *user_data);
  422. /**
  423. * hb_font_get_glyph_from_name_func_t:
  424. * @font: #hb_font_t to work upon
  425. * @font_data: @font user data pointer
  426. * @name: (array length=len): The name string to query
  427. * @len: The length of the name queried
  428. * @glyph: (out): The glyph ID retrieved
  429. * @user_data: User data pointer passed by the caller
  430. *
  431. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  432. *
  433. * This method should retrieve the glyph ID that corresponds to a glyph-name
  434. * string.
  435. *
  436. * Return value: `true` if data found, `false` otherwise
  437. *
  438. **/
  439. typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data,
  440. const char *name, int len, /* -1 means nul-terminated */
  441. hb_codepoint_t *glyph,
  442. void *user_data);
  443. /**
  444. * hb_font_draw_glyph_func_t:
  445. * @font: #hb_font_t to work upon
  446. * @font_data: @font user data pointer
  447. * @glyph: The glyph ID to query
  448. * @draw_funcs: The draw functions to send the shape data to
  449. * @draw_data: The data accompanying the draw functions
  450. * @user_data: User data pointer passed by the caller
  451. *
  452. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  453. *
  454. * Since: 7.0.0
  455. *
  456. **/
  457. typedef void (*hb_font_draw_glyph_func_t) (hb_font_t *font, void *font_data,
  458. hb_codepoint_t glyph,
  459. hb_draw_funcs_t *draw_funcs, void *draw_data,
  460. void *user_data);
  461. /**
  462. * hb_font_paint_glyph_func_t:
  463. * @font: #hb_font_t to work upon
  464. * @font_data: @font user data pointer
  465. * @glyph: The glyph ID to query
  466. * @paint_funcs: The paint functions to use
  467. * @paint_data: The data accompanying the paint functions
  468. * @palette_index: The color palette to use
  469. * @foreground: The foreground color
  470. * @user_data: User data pointer passed by the caller
  471. *
  472. * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
  473. *
  474. * Since: 7.0.0
  475. */
  476. typedef void (*hb_font_paint_glyph_func_t) (hb_font_t *font, void *font_data,
  477. hb_codepoint_t glyph,
  478. hb_paint_funcs_t *paint_funcs, void *paint_data,
  479. unsigned int palette_index,
  480. hb_color_t foreground,
  481. void *user_data);
  482. /* func setters */
  483. /**
  484. * hb_font_funcs_set_font_h_extents_func:
  485. * @ffuncs: A font-function structure
  486. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  487. * @user_data: Data to pass to @func
  488. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  489. *
  490. * Sets the implementation function for #hb_font_get_font_h_extents_func_t.
  491. *
  492. * Since: 1.1.2
  493. **/
  494. HB_EXTERN void
  495. hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t *ffuncs,
  496. hb_font_get_font_h_extents_func_t func,
  497. void *user_data, hb_destroy_func_t destroy);
  498. /**
  499. * hb_font_funcs_set_font_v_extents_func:
  500. * @ffuncs: A font-function structure
  501. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  502. * @user_data: Data to pass to @func
  503. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  504. *
  505. * Sets the implementation function for #hb_font_get_font_v_extents_func_t.
  506. *
  507. * Since: 1.1.2
  508. **/
  509. HB_EXTERN void
  510. hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs,
  511. hb_font_get_font_v_extents_func_t func,
  512. void *user_data, hb_destroy_func_t destroy);
  513. /**
  514. * hb_font_funcs_set_nominal_glyph_func:
  515. * @ffuncs: A font-function structure
  516. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  517. * @user_data: Data to pass to @func
  518. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  519. *
  520. * Sets the implementation function for #hb_font_get_nominal_glyph_func_t.
  521. *
  522. * Since: 1.2.3
  523. **/
  524. HB_EXTERN void
  525. hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs,
  526. hb_font_get_nominal_glyph_func_t func,
  527. void *user_data, hb_destroy_func_t destroy);
  528. /**
  529. * hb_font_funcs_set_nominal_glyphs_func:
  530. * @ffuncs: A font-function structure
  531. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  532. * @user_data: Data to pass to @func
  533. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  534. *
  535. * Sets the implementation function for #hb_font_get_nominal_glyphs_func_t.
  536. *
  537. * Since: 2.0.0
  538. **/
  539. HB_EXTERN void
  540. hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t *ffuncs,
  541. hb_font_get_nominal_glyphs_func_t func,
  542. void *user_data, hb_destroy_func_t destroy);
  543. /**
  544. * hb_font_funcs_set_variation_glyph_func:
  545. * @ffuncs: A font-function structure
  546. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  547. * @user_data: Data to pass to @func
  548. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  549. *
  550. * Sets the implementation function for #hb_font_get_variation_glyph_func_t.
  551. *
  552. * Since: 1.2.3
  553. **/
  554. HB_EXTERN void
  555. hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs,
  556. hb_font_get_variation_glyph_func_t func,
  557. void *user_data, hb_destroy_func_t destroy);
  558. /**
  559. * hb_font_funcs_set_glyph_h_advance_func:
  560. * @ffuncs: A font-function structure
  561. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  562. * @user_data: Data to pass to @func
  563. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  564. *
  565. * Sets the implementation function for #hb_font_get_glyph_h_advance_func_t.
  566. *
  567. * Since: 0.9.2
  568. **/
  569. HB_EXTERN void
  570. hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
  571. hb_font_get_glyph_h_advance_func_t func,
  572. void *user_data, hb_destroy_func_t destroy);
  573. /**
  574. * hb_font_funcs_set_glyph_v_advance_func:
  575. * @ffuncs: A font-function structure
  576. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  577. * @user_data: Data to pass to @func
  578. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  579. *
  580. * Sets the implementation function for #hb_font_get_glyph_v_advance_func_t.
  581. *
  582. * Since: 0.9.2
  583. **/
  584. HB_EXTERN void
  585. hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
  586. hb_font_get_glyph_v_advance_func_t func,
  587. void *user_data, hb_destroy_func_t destroy);
  588. /**
  589. * hb_font_funcs_set_glyph_h_advances_func:
  590. * @ffuncs: A font-function structure
  591. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  592. * @user_data: Data to pass to @func
  593. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  594. *
  595. * Sets the implementation function for #hb_font_get_glyph_h_advances_func_t.
  596. *
  597. * Since: 1.8.6
  598. **/
  599. HB_EXTERN void
  600. hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t *ffuncs,
  601. hb_font_get_glyph_h_advances_func_t func,
  602. void *user_data, hb_destroy_func_t destroy);
  603. /**
  604. * hb_font_funcs_set_glyph_v_advances_func:
  605. * @ffuncs: A font-function structure
  606. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  607. * @user_data: Data to pass to @func
  608. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  609. *
  610. * Sets the implementation function for #hb_font_get_glyph_v_advances_func_t.
  611. *
  612. * Since: 1.8.6
  613. **/
  614. HB_EXTERN void
  615. hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t *ffuncs,
  616. hb_font_get_glyph_v_advances_func_t func,
  617. void *user_data, hb_destroy_func_t destroy);
  618. /**
  619. * hb_font_funcs_set_glyph_h_origin_func:
  620. * @ffuncs: A font-function structure
  621. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  622. * @user_data: Data to pass to @func
  623. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  624. *
  625. * Sets the implementation function for #hb_font_get_glyph_h_origin_func_t.
  626. *
  627. * Since: 0.9.2
  628. **/
  629. HB_EXTERN void
  630. hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
  631. hb_font_get_glyph_h_origin_func_t func,
  632. void *user_data, hb_destroy_func_t destroy);
  633. /**
  634. * hb_font_funcs_set_glyph_v_origin_func:
  635. * @ffuncs: A font-function structure
  636. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  637. * @user_data: Data to pass to @func
  638. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  639. *
  640. * Sets the implementation function for #hb_font_get_glyph_v_origin_func_t.
  641. *
  642. * Since: 0.9.2
  643. **/
  644. HB_EXTERN void
  645. hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
  646. hb_font_get_glyph_v_origin_func_t func,
  647. void *user_data, hb_destroy_func_t destroy);
  648. /**
  649. * hb_font_funcs_set_glyph_h_kerning_func:
  650. * @ffuncs: A font-function structure
  651. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  652. * @user_data: Data to pass to @func
  653. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  654. *
  655. * Sets the implementation function for #hb_font_get_glyph_h_kerning_func_t.
  656. *
  657. * Since: 0.9.2
  658. **/
  659. HB_EXTERN void
  660. hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
  661. hb_font_get_glyph_h_kerning_func_t func,
  662. void *user_data, hb_destroy_func_t destroy);
  663. /**
  664. * hb_font_funcs_set_glyph_extents_func:
  665. * @ffuncs: A font-function structure
  666. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  667. * @user_data: Data to pass to @func
  668. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  669. *
  670. * Sets the implementation function for #hb_font_get_glyph_extents_func_t.
  671. *
  672. * Since: 0.9.2
  673. **/
  674. HB_EXTERN void
  675. hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
  676. hb_font_get_glyph_extents_func_t func,
  677. void *user_data, hb_destroy_func_t destroy);
  678. /**
  679. * hb_font_funcs_set_glyph_contour_point_func:
  680. * @ffuncs: A font-function structure
  681. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  682. * @user_data: Data to pass to @func
  683. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  684. *
  685. * Sets the implementation function for #hb_font_get_glyph_contour_point_func_t.
  686. *
  687. * Since: 0.9.2
  688. **/
  689. HB_EXTERN void
  690. hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
  691. hb_font_get_glyph_contour_point_func_t func,
  692. void *user_data, hb_destroy_func_t destroy);
  693. /**
  694. * hb_font_funcs_set_glyph_name_func:
  695. * @ffuncs: A font-function structure
  696. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  697. * @user_data: Data to pass to @func
  698. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  699. *
  700. * Sets the implementation function for #hb_font_get_glyph_name_func_t.
  701. *
  702. * Since: 0.9.2
  703. **/
  704. HB_EXTERN void
  705. hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
  706. hb_font_get_glyph_name_func_t func,
  707. void *user_data, hb_destroy_func_t destroy);
  708. /**
  709. * hb_font_funcs_set_glyph_from_name_func:
  710. * @ffuncs: A font-function structure
  711. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  712. * @user_data: Data to pass to @func
  713. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  714. *
  715. * Sets the implementation function for #hb_font_get_glyph_from_name_func_t.
  716. *
  717. * Since: 0.9.2
  718. **/
  719. HB_EXTERN void
  720. hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
  721. hb_font_get_glyph_from_name_func_t func,
  722. void *user_data, hb_destroy_func_t destroy);
  723. /**
  724. * hb_font_funcs_set_draw_glyph_func:
  725. * @ffuncs: A font-function structure
  726. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  727. * @user_data: Data to pass to @func
  728. * @destroy: (nullable): The function to call when @user_data is not needed anymore
  729. *
  730. * Sets the implementation function for #hb_font_draw_glyph_func_t.
  731. *
  732. * Since: 7.0.0
  733. **/
  734. HB_EXTERN void
  735. hb_font_funcs_set_draw_glyph_func (hb_font_funcs_t *ffuncs,
  736. hb_font_draw_glyph_func_t func,
  737. void *user_data, hb_destroy_func_t destroy);
  738. /**
  739. * hb_font_funcs_set_paint_glyph_func:
  740. * @ffuncs: A font-function structure
  741. * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
  742. * @user_data: Data to pass to @func
  743. * @destroy: (nullable): The function to call when @user_data is no longer needed
  744. *
  745. * Sets the implementation function for #hb_font_paint_glyph_func_t.
  746. *
  747. * Since: 7.0.0
  748. */
  749. HB_EXTERN void
  750. hb_font_funcs_set_paint_glyph_func (hb_font_funcs_t *ffuncs,
  751. hb_font_paint_glyph_func_t func,
  752. void *user_data, hb_destroy_func_t destroy);
  753. /* func dispatch */
  754. HB_EXTERN hb_bool_t
  755. hb_font_get_h_extents (hb_font_t *font,
  756. hb_font_extents_t *extents);
  757. HB_EXTERN hb_bool_t
  758. hb_font_get_v_extents (hb_font_t *font,
  759. hb_font_extents_t *extents);
  760. HB_EXTERN hb_bool_t
  761. hb_font_get_nominal_glyph (hb_font_t *font,
  762. hb_codepoint_t unicode,
  763. hb_codepoint_t *glyph);
  764. HB_EXTERN hb_bool_t
  765. hb_font_get_variation_glyph (hb_font_t *font,
  766. hb_codepoint_t unicode, hb_codepoint_t variation_selector,
  767. hb_codepoint_t *glyph);
  768. HB_EXTERN unsigned int
  769. hb_font_get_nominal_glyphs (hb_font_t *font,
  770. unsigned int count,
  771. const hb_codepoint_t *first_unicode,
  772. unsigned int unicode_stride,
  773. hb_codepoint_t *first_glyph,
  774. unsigned int glyph_stride);
  775. HB_EXTERN hb_position_t
  776. hb_font_get_glyph_h_advance (hb_font_t *font,
  777. hb_codepoint_t glyph);
  778. HB_EXTERN hb_position_t
  779. hb_font_get_glyph_v_advance (hb_font_t *font,
  780. hb_codepoint_t glyph);
  781. HB_EXTERN void
  782. hb_font_get_glyph_h_advances (hb_font_t* font,
  783. unsigned int count,
  784. const hb_codepoint_t *first_glyph,
  785. unsigned glyph_stride,
  786. hb_position_t *first_advance,
  787. unsigned advance_stride);
  788. HB_EXTERN void
  789. hb_font_get_glyph_v_advances (hb_font_t* font,
  790. unsigned int count,
  791. const hb_codepoint_t *first_glyph,
  792. unsigned glyph_stride,
  793. hb_position_t *first_advance,
  794. unsigned advance_stride);
  795. HB_EXTERN hb_bool_t
  796. hb_font_get_glyph_h_origin (hb_font_t *font,
  797. hb_codepoint_t glyph,
  798. hb_position_t *x, hb_position_t *y);
  799. HB_EXTERN hb_bool_t
  800. hb_font_get_glyph_v_origin (hb_font_t *font,
  801. hb_codepoint_t glyph,
  802. hb_position_t *x, hb_position_t *y);
  803. HB_EXTERN hb_position_t
  804. hb_font_get_glyph_h_kerning (hb_font_t *font,
  805. hb_codepoint_t left_glyph, hb_codepoint_t right_glyph);
  806. HB_EXTERN hb_bool_t
  807. hb_font_get_glyph_extents (hb_font_t *font,
  808. hb_codepoint_t glyph,
  809. hb_glyph_extents_t *extents);
  810. HB_EXTERN hb_bool_t
  811. hb_font_get_glyph_contour_point (hb_font_t *font,
  812. hb_codepoint_t glyph, unsigned int point_index,
  813. hb_position_t *x, hb_position_t *y);
  814. HB_EXTERN hb_bool_t
  815. hb_font_get_glyph_name (hb_font_t *font,
  816. hb_codepoint_t glyph,
  817. char *name, unsigned int size);
  818. HB_EXTERN hb_bool_t
  819. hb_font_get_glyph_from_name (hb_font_t *font,
  820. const char *name, int len, /* -1 means nul-terminated */
  821. hb_codepoint_t *glyph);
  822. HB_EXTERN void
  823. hb_font_draw_glyph (hb_font_t *font,
  824. hb_codepoint_t glyph,
  825. hb_draw_funcs_t *dfuncs, void *draw_data);
  826. HB_EXTERN void
  827. hb_font_paint_glyph (hb_font_t *font,
  828. hb_codepoint_t glyph,
  829. hb_paint_funcs_t *pfuncs, void *paint_data,
  830. unsigned int palette_index,
  831. hb_color_t foreground);
  832. /* high-level funcs, with fallback */
  833. /* Calls either hb_font_get_nominal_glyph() if variation_selector is 0,
  834. * otherwise calls hb_font_get_variation_glyph(). */
  835. HB_EXTERN hb_bool_t
  836. hb_font_get_glyph (hb_font_t *font,
  837. hb_codepoint_t unicode, hb_codepoint_t variation_selector,
  838. hb_codepoint_t *glyph);
  839. HB_EXTERN void
  840. hb_font_get_extents_for_direction (hb_font_t *font,
  841. hb_direction_t direction,
  842. hb_font_extents_t *extents);
  843. HB_EXTERN void
  844. hb_font_get_glyph_advance_for_direction (hb_font_t *font,
  845. hb_codepoint_t glyph,
  846. hb_direction_t direction,
  847. hb_position_t *x, hb_position_t *y);
  848. HB_EXTERN void
  849. hb_font_get_glyph_advances_for_direction (hb_font_t* font,
  850. hb_direction_t direction,
  851. unsigned int count,
  852. const hb_codepoint_t *first_glyph,
  853. unsigned glyph_stride,
  854. hb_position_t *first_advance,
  855. unsigned advance_stride);
  856. HB_EXTERN void
  857. hb_font_get_glyph_origin_for_direction (hb_font_t *font,
  858. hb_codepoint_t glyph,
  859. hb_direction_t direction,
  860. hb_position_t *x, hb_position_t *y);
  861. HB_EXTERN void
  862. hb_font_add_glyph_origin_for_direction (hb_font_t *font,
  863. hb_codepoint_t glyph,
  864. hb_direction_t direction,
  865. hb_position_t *x, hb_position_t *y);
  866. HB_EXTERN void
  867. hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
  868. hb_codepoint_t glyph,
  869. hb_direction_t direction,
  870. hb_position_t *x, hb_position_t *y);
  871. HB_EXTERN void
  872. hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
  873. hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
  874. hb_direction_t direction,
  875. hb_position_t *x, hb_position_t *y);
  876. HB_EXTERN hb_bool_t
  877. hb_font_get_glyph_extents_for_origin (hb_font_t *font,
  878. hb_codepoint_t glyph,
  879. hb_direction_t direction,
  880. hb_glyph_extents_t *extents);
  881. HB_EXTERN hb_bool_t
  882. hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
  883. hb_codepoint_t glyph, unsigned int point_index,
  884. hb_direction_t direction,
  885. hb_position_t *x, hb_position_t *y);
  886. /* Generates gidDDD if glyph has no name. */
  887. HB_EXTERN void
  888. hb_font_glyph_to_string (hb_font_t *font,
  889. hb_codepoint_t glyph,
  890. char *s, unsigned int size);
  891. /* Parses gidDDD and uniUUUU strings automatically. */
  892. HB_EXTERN hb_bool_t
  893. hb_font_glyph_from_string (hb_font_t *font,
  894. const char *s, int len, /* -1 means nul-terminated */
  895. hb_codepoint_t *glyph);
  896. /*
  897. * hb_font_t
  898. */
  899. /* Fonts are very light-weight objects */
  900. HB_EXTERN hb_font_t *
  901. hb_font_create (hb_face_t *face);
  902. HB_EXTERN hb_font_t *
  903. hb_font_create_sub_font (hb_font_t *parent);
  904. HB_EXTERN hb_font_t *
  905. hb_font_get_empty (void);
  906. HB_EXTERN hb_font_t *
  907. hb_font_reference (hb_font_t *font);
  908. HB_EXTERN void
  909. hb_font_destroy (hb_font_t *font);
  910. HB_EXTERN hb_bool_t
  911. hb_font_set_user_data (hb_font_t *font,
  912. hb_user_data_key_t *key,
  913. void * data,
  914. hb_destroy_func_t destroy,
  915. hb_bool_t replace);
  916. HB_EXTERN void *
  917. hb_font_get_user_data (const hb_font_t *font,
  918. hb_user_data_key_t *key);
  919. HB_EXTERN void
  920. hb_font_make_immutable (hb_font_t *font);
  921. HB_EXTERN hb_bool_t
  922. hb_font_is_immutable (hb_font_t *font);
  923. HB_EXTERN unsigned int
  924. hb_font_get_serial (hb_font_t *font);
  925. HB_EXTERN void
  926. hb_font_changed (hb_font_t *font);
  927. HB_EXTERN void
  928. hb_font_set_parent (hb_font_t *font,
  929. hb_font_t *parent);
  930. HB_EXTERN hb_font_t *
  931. hb_font_get_parent (hb_font_t *font);
  932. HB_EXTERN void
  933. hb_font_set_face (hb_font_t *font,
  934. hb_face_t *face);
  935. HB_EXTERN hb_face_t *
  936. hb_font_get_face (hb_font_t *font);
  937. HB_EXTERN void
  938. hb_font_set_funcs (hb_font_t *font,
  939. hb_font_funcs_t *klass,
  940. void *font_data,
  941. hb_destroy_func_t destroy);
  942. /* Be *very* careful with this function! */
  943. HB_EXTERN void
  944. hb_font_set_funcs_data (hb_font_t *font,
  945. void *font_data,
  946. hb_destroy_func_t destroy);
  947. HB_EXTERN void
  948. hb_font_set_scale (hb_font_t *font,
  949. int x_scale,
  950. int y_scale);
  951. HB_EXTERN void
  952. hb_font_get_scale (hb_font_t *font,
  953. int *x_scale,
  954. int *y_scale);
  955. /*
  956. * A zero value means "no hinting in that direction"
  957. */
  958. HB_EXTERN void
  959. hb_font_set_ppem (hb_font_t *font,
  960. unsigned int x_ppem,
  961. unsigned int y_ppem);
  962. HB_EXTERN void
  963. hb_font_get_ppem (hb_font_t *font,
  964. unsigned int *x_ppem,
  965. unsigned int *y_ppem);
  966. /*
  967. * Point size per EM. Used for optical-sizing in CoreText.
  968. * A value of zero means "not set".
  969. */
  970. HB_EXTERN void
  971. hb_font_set_ptem (hb_font_t *font, float ptem);
  972. HB_EXTERN float
  973. hb_font_get_ptem (hb_font_t *font);
  974. HB_EXTERN void
  975. hb_font_set_synthetic_bold (hb_font_t *font,
  976. float x_embolden, float y_embolden,
  977. hb_bool_t in_place);
  978. HB_EXTERN void
  979. hb_font_get_synthetic_bold (hb_font_t *font,
  980. float *x_embolden, float *y_embolden,
  981. hb_bool_t *in_place);
  982. HB_EXTERN void
  983. hb_font_set_synthetic_slant (hb_font_t *font, float slant);
  984. HB_EXTERN float
  985. hb_font_get_synthetic_slant (hb_font_t *font);
  986. HB_EXTERN void
  987. hb_font_set_variations (hb_font_t *font,
  988. const hb_variation_t *variations,
  989. unsigned int variations_length);
  990. HB_EXTERN void
  991. hb_font_set_variation (hb_font_t *font,
  992. hb_tag_t tag,
  993. float value);
  994. HB_EXTERN void
  995. hb_font_set_var_coords_design (hb_font_t *font,
  996. const float *coords,
  997. unsigned int coords_length);
  998. HB_EXTERN const float *
  999. hb_font_get_var_coords_design (hb_font_t *font,
  1000. unsigned int *length);
  1001. HB_EXTERN void
  1002. hb_font_set_var_coords_normalized (hb_font_t *font,
  1003. const int *coords, /* 2.14 normalized */
  1004. unsigned int coords_length);
  1005. HB_EXTERN const int *
  1006. hb_font_get_var_coords_normalized (hb_font_t *font,
  1007. unsigned int *length);
  1008. /**
  1009. * HB_FONT_NO_VAR_NAMED_INSTANCE:
  1010. *
  1011. * Constant signifying that a font does not have any
  1012. * named-instance index set. This is the default of
  1013. * a font.
  1014. *
  1015. * Since: 7.0.0
  1016. */
  1017. #define HB_FONT_NO_VAR_NAMED_INSTANCE 0xFFFFFFFF
  1018. HB_EXTERN void
  1019. hb_font_set_var_named_instance (hb_font_t *font,
  1020. unsigned int instance_index);
  1021. HB_EXTERN unsigned int
  1022. hb_font_get_var_named_instance (hb_font_t *font);
  1023. HB_END_DECLS
  1024. #endif /* HB_FONT_H */