Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 09:01:46

0001 /*
0002  * Copyright © 2009  Red Hat, Inc.
0003  *
0004  *  This is part of HarfBuzz, a text shaping library.
0005  *
0006  * Permission is hereby granted, without written agreement and without
0007  * license or royalty fees, to use, copy, modify, and distribute this
0008  * software and its documentation for any purpose, provided that the
0009  * above copyright notice and the following two paragraphs appear in
0010  * all copies of this software.
0011  *
0012  * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
0013  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
0014  * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
0015  * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
0016  * DAMAGE.
0017  *
0018  * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
0019  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
0020  * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
0021  * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
0022  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
0023  *
0024  * Red Hat Author(s): Behdad Esfahbod
0025  */
0026 
0027 #if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
0028 #error "Include <hb.h> instead."
0029 #endif
0030 
0031 #ifndef HB_FONT_H
0032 #define HB_FONT_H
0033 
0034 #include "hb-common.h"
0035 #include "hb-face.h"
0036 #include "hb-draw.h"
0037 #include "hb-paint.h"
0038 
0039 HB_BEGIN_DECLS
0040 
0041 /*
0042  * hb_font_funcs_t
0043  */
0044 
0045 /**
0046  * hb_font_funcs_t:
0047  *
0048  * Data type containing a set of virtual methods used for
0049  * working on #hb_font_t font objects.
0050  *
0051  * HarfBuzz provides a lightweight default function for each of 
0052  * the methods in #hb_font_funcs_t. Client programs can implement
0053  * their own replacements for the individual font functions, as
0054  * needed, and replace the default by calling the setter for a
0055  * method.
0056  *
0057  **/
0058 typedef struct hb_font_funcs_t hb_font_funcs_t;
0059 
0060 HB_EXTERN hb_font_funcs_t *
0061 hb_font_funcs_create (void);
0062 
0063 HB_EXTERN hb_font_funcs_t *
0064 hb_font_funcs_get_empty (void);
0065 
0066 HB_EXTERN hb_font_funcs_t *
0067 hb_font_funcs_reference (hb_font_funcs_t *ffuncs);
0068 
0069 HB_EXTERN void
0070 hb_font_funcs_destroy (hb_font_funcs_t *ffuncs);
0071 
0072 HB_EXTERN hb_bool_t
0073 hb_font_funcs_set_user_data (hb_font_funcs_t    *ffuncs,
0074                  hb_user_data_key_t *key,
0075                  void *              data,
0076                  hb_destroy_func_t   destroy,
0077                  hb_bool_t           replace);
0078 
0079 
0080 HB_EXTERN void *
0081 hb_font_funcs_get_user_data (const hb_font_funcs_t *ffuncs,
0082                  hb_user_data_key_t    *key);
0083 
0084 
0085 HB_EXTERN void
0086 hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs);
0087 
0088 HB_EXTERN hb_bool_t
0089 hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs);
0090 
0091 
0092 /* font extents */
0093 
0094 /**
0095  * hb_font_extents_t:
0096  * @ascender: The height of typographic ascenders.
0097  * @descender: The depth of typographic descenders.
0098  * @line_gap: The suggested line-spacing gap.
0099  *
0100  * Font-wide extent values, measured in font units.
0101  *
0102  * Note that typically @ascender is positive and @descender
0103  * negative, in coordinate systems that grow up.
0104  **/
0105 typedef struct hb_font_extents_t {
0106   hb_position_t ascender;
0107   hb_position_t descender;
0108   hb_position_t line_gap;
0109   /*< private >*/
0110   hb_position_t reserved9;
0111   hb_position_t reserved8;
0112   hb_position_t reserved7;
0113   hb_position_t reserved6;
0114   hb_position_t reserved5;
0115   hb_position_t reserved4;
0116   hb_position_t reserved3;
0117   hb_position_t reserved2;
0118   hb_position_t reserved1;
0119 } hb_font_extents_t;
0120 
0121 /* func types */
0122 
0123 /**
0124  * hb_font_get_font_extents_func_t:
0125  * @font: #hb_font_t to work upon
0126  * @font_data: @font user data pointer
0127  * @extents: (out): The font extents retrieved
0128  * @user_data: User data pointer passed by the caller
0129  *
0130  * This method should retrieve the extents for a font.
0131  *
0132  **/
0133 typedef hb_bool_t (*hb_font_get_font_extents_func_t) (hb_font_t *font, void *font_data,
0134                                hb_font_extents_t *extents,
0135                                void *user_data);
0136 
0137 /**
0138  * hb_font_get_font_h_extents_func_t:
0139  *
0140  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0141  *
0142  * This method should retrieve the extents for a font, for horizontal-direction
0143  * text segments. Extents must be returned in an #hb_glyph_extents output
0144  * parameter.
0145  * 
0146  **/
0147 typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t;
0148 
0149 /**
0150  * hb_font_get_font_v_extents_func_t:
0151  *
0152  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0153  *
0154  * This method should retrieve the extents for a font, for vertical-direction
0155  * text segments. Extents must be returned in an #hb_glyph_extents output
0156  * parameter.
0157  * 
0158  **/
0159 typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t;
0160 
0161 
0162 /**
0163  * hb_font_get_nominal_glyph_func_t:
0164  * @font: #hb_font_t to work upon
0165  * @font_data: @font user data pointer
0166  * @unicode: The Unicode code point to query
0167  * @glyph: (out): The glyph ID retrieved
0168  * @user_data: User data pointer passed by the caller
0169  *
0170  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0171  *
0172  * This method should retrieve the nominal glyph ID for a specified Unicode code
0173  * point. Glyph IDs must be returned in a #hb_codepoint_t output parameter.
0174  * 
0175  * Return value: `true` if data found, `false` otherwise
0176  *
0177  **/
0178 typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data,
0179                                hb_codepoint_t unicode,
0180                                hb_codepoint_t *glyph,
0181                                void *user_data);
0182 
0183 /**
0184  * hb_font_get_variation_glyph_func_t:
0185  * @font: #hb_font_t to work upon
0186  * @font_data: @font user data pointer
0187  * @unicode: The Unicode code point to query
0188  * @variation_selector: The  variation-selector code point to query
0189  * @glyph: (out): The glyph ID retrieved
0190  * @user_data: User data pointer passed by the caller
0191  *
0192  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0193  *
0194  * This method should retrieve the glyph ID for a specified Unicode code point
0195  * followed by a specified Variation Selector code point. Glyph IDs must be
0196  * returned in a #hb_codepoint_t output parameter.
0197  * 
0198  * Return value: `true` if data found, `false` otherwise
0199  *
0200  **/
0201 typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data,
0202                              hb_codepoint_t unicode, hb_codepoint_t variation_selector,
0203                              hb_codepoint_t *glyph,
0204                              void *user_data);
0205 
0206 
0207 /**
0208  * hb_font_get_nominal_glyphs_func_t:
0209  * @font: #hb_font_t to work upon
0210  * @font_data: @font user data pointer
0211  * @count: number of code points to query
0212  * @first_unicode: The first Unicode code point to query
0213  * @unicode_stride: The stride between successive code points
0214  * @first_glyph: (out): The first glyph ID retrieved
0215  * @glyph_stride: The stride between successive glyph IDs
0216  * @user_data: User data pointer passed by the caller
0217  *
0218  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0219  *
0220  * This method should retrieve the nominal glyph IDs for a sequence of
0221  * Unicode code points. Glyph IDs must be returned in a #hb_codepoint_t
0222  * output parameter.
0223  *
0224  * Return value: the number of code points processed
0225  * 
0226  **/
0227 typedef unsigned int (*hb_font_get_nominal_glyphs_func_t) (hb_font_t *font, void *font_data,
0228                                unsigned int count,
0229                                const hb_codepoint_t *first_unicode,
0230                                unsigned int unicode_stride,
0231                                hb_codepoint_t *first_glyph,
0232                                unsigned int glyph_stride,
0233                                void *user_data);
0234 
0235 /**
0236  * hb_font_get_glyph_advance_func_t:
0237  * @font: #hb_font_t to work upon
0238  * @font_data: @font user data pointer
0239  * @glyph: The glyph ID to query
0240  * @user_data: User data pointer passed by the caller
0241  *
0242  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0243  *
0244  * This method should retrieve the advance for a specified glyph. The
0245  * method must return an #hb_position_t.
0246  * 
0247  * Return value: The advance of @glyph within @font
0248  *
0249  **/
0250 typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data,
0251                                hb_codepoint_t glyph,
0252                                void *user_data);
0253 
0254 /**
0255  * hb_font_get_glyph_h_advance_func_t:
0256  *
0257  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0258  *
0259  * This method should retrieve the advance for a specified glyph, in
0260  * horizontal-direction text segments. Advances must be returned in
0261  * an #hb_position_t output parameter.
0262  * 
0263  **/
0264 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t;
0265 
0266 /**
0267  * hb_font_get_glyph_v_advance_func_t:
0268  *
0269  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0270  *
0271  * This method should retrieve the advance for a specified glyph, in
0272  * vertical-direction text segments. Advances must be returned in
0273  * an #hb_position_t output parameter.
0274  * 
0275  **/
0276 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t;
0277 
0278 /**
0279  * hb_font_get_glyph_advances_func_t:
0280  * @font: #hb_font_t to work upon
0281  * @font_data: @font user data pointer
0282  * @count: The number of glyph IDs in the sequence queried
0283  * @first_glyph: The first glyph ID to query
0284  * @glyph_stride: The stride between successive glyph IDs
0285  * @first_advance: (out): The first advance retrieved
0286  * @advance_stride: The stride between successive advances
0287  * @user_data: User data pointer passed by the caller
0288  *
0289  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0290  *
0291  * This method should retrieve the advances for a sequence of glyphs.
0292  * 
0293  **/
0294 typedef void (*hb_font_get_glyph_advances_func_t) (hb_font_t* font, void* font_data,
0295                            unsigned int count,
0296                            const hb_codepoint_t *first_glyph,
0297                            unsigned glyph_stride,
0298                            hb_position_t *first_advance,
0299                            unsigned advance_stride,
0300                            void *user_data);
0301 
0302 /**
0303  * hb_font_get_glyph_h_advances_func_t:
0304  *
0305  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0306  *
0307  * This method should retrieve the advances for a sequence of glyphs, in
0308  * horizontal-direction text segments.
0309  * 
0310  **/
0311 typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_h_advances_func_t;
0312 
0313 /**
0314  * hb_font_get_glyph_v_advances_func_t:
0315  *
0316  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0317  *
0318  * This method should retrieve the advances for a sequence of glyphs, in
0319  * vertical-direction text segments.
0320  * 
0321  **/
0322 typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_v_advances_func_t;
0323 
0324 /**
0325  * hb_font_get_glyph_origin_func_t:
0326  * @font: #hb_font_t to work upon
0327  * @font_data: @font user data pointer
0328  * @glyph: The glyph ID to query
0329  * @x: (out): The X coordinate of the origin
0330  * @y: (out): The Y coordinate of the origin
0331  * @user_data: User data pointer passed by the caller
0332  *
0333  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0334  *
0335  * This method should retrieve the (X,Y) coordinates (in font units) of the
0336  * origin for a glyph. Each coordinate must be returned in an #hb_position_t
0337  * output parameter.
0338  *
0339  * Return value: `true` if data found, `false` otherwise
0340  * 
0341  **/
0342 typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data,
0343                               hb_codepoint_t glyph,
0344                               hb_position_t *x, hb_position_t *y,
0345                               void *user_data);
0346 
0347 /**
0348  * hb_font_get_glyph_h_origin_func_t:
0349  *
0350  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0351  *
0352  * This method should retrieve the (X,Y) coordinates (in font units) of the
0353  * origin for a glyph, for horizontal-direction text segments. Each
0354  * coordinate must be returned in an #hb_position_t output parameter.
0355  * 
0356  **/
0357 typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t;
0358 
0359 /**
0360  * hb_font_get_glyph_v_origin_func_t:
0361  *
0362  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0363  *
0364  * This method should retrieve the (X,Y) coordinates (in font units) of the
0365  * origin for a glyph, for vertical-direction text segments. Each coordinate
0366  * must be returned in an #hb_position_t output parameter.
0367  * 
0368  **/
0369 typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t;
0370 
0371 /**
0372  * hb_font_get_glyph_kerning_func_t:
0373  * @font: #hb_font_t to work upon
0374  * @font_data: @font user data pointer
0375  * @first_glyph: The glyph ID of the first glyph in the glyph pair
0376  * @second_glyph: The glyph ID of the second glyph in the glyph pair
0377  * @user_data: User data pointer passed by the caller
0378  *
0379  * This method should retrieve the kerning-adjustment value for a glyph-pair in
0380  * the specified font, for horizontal text segments.
0381  *
0382  **/
0383 typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data,
0384                                hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
0385                                void *user_data);
0386 /**
0387  * hb_font_get_glyph_h_kerning_func_t:
0388  *
0389  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0390  *
0391  * This method should retrieve the kerning-adjustment value for a glyph-pair in
0392  * the specified font, for horizontal text segments.
0393  *
0394  **/
0395 typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t;
0396 
0397 
0398 /**
0399  * hb_font_get_glyph_extents_func_t:
0400  * @font: #hb_font_t to work upon
0401  * @font_data: @font user data pointer
0402  * @glyph: The glyph ID to query
0403  * @extents: (out): The #hb_glyph_extents_t retrieved
0404  * @user_data: User data pointer passed by the caller
0405  *
0406  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0407  *
0408  * This method should retrieve the extents for a specified glyph. Extents must be 
0409  * returned in an #hb_glyph_extents output parameter.
0410  *
0411  * Return value: `true` if data found, `false` otherwise
0412  * 
0413  **/
0414 typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data,
0415                                hb_codepoint_t glyph,
0416                                hb_glyph_extents_t *extents,
0417                                void *user_data);
0418 
0419 /**
0420  * hb_font_get_glyph_contour_point_func_t:
0421  * @font: #hb_font_t to work upon
0422  * @font_data: @font user data pointer
0423  * @glyph: The glyph ID to query
0424  * @point_index: The contour-point index to query
0425  * @x: (out): The X value retrieved for the contour point
0426  * @y: (out): The Y value retrieved for the contour point
0427  * @user_data: User data pointer passed by the caller
0428  *
0429  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0430  *
0431  * This method should retrieve the (X,Y) coordinates (in font units) for a
0432  * specified contour point in a glyph. Each coordinate must be returned as
0433  * an #hb_position_t output parameter.
0434  * 
0435  * Return value: `true` if data found, `false` otherwise
0436  *
0437  **/
0438 typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data,
0439                                  hb_codepoint_t glyph, unsigned int point_index,
0440                                  hb_position_t *x, hb_position_t *y,
0441                                  void *user_data);
0442 
0443 
0444 /**
0445  * hb_font_get_glyph_name_func_t:
0446  * @font: #hb_font_t to work upon
0447  * @font_data: @font user data pointer
0448  * @glyph: The glyph ID to query
0449  * @name: (out) (array length=size): Name string retrieved for the glyph ID
0450  * @size: Length of the glyph-name string retrieved
0451  * @user_data: User data pointer passed by the caller
0452  *
0453  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0454  *
0455  * This method should retrieve the glyph name that corresponds to a
0456  * glyph ID. The name should be returned in a string output parameter.
0457  * 
0458  * Return value: `true` if data found, `false` otherwise
0459  *
0460  **/
0461 typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data,
0462                             hb_codepoint_t glyph,
0463                             char *name, unsigned int size,
0464                             void *user_data);
0465 
0466 /**
0467  * hb_font_get_glyph_from_name_func_t:
0468  * @font: #hb_font_t to work upon
0469  * @font_data: @font user data pointer
0470  * @name: (array length=len): The name string to query
0471  * @len: The length of the name queried
0472  * @glyph: (out): The glyph ID retrieved
0473  * @user_data: User data pointer passed by the caller
0474  *
0475  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0476  *
0477  * This method should retrieve the glyph ID that corresponds to a glyph-name
0478  * string. 
0479  * 
0480  * Return value: `true` if data found, `false` otherwise
0481  *
0482  **/
0483 typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data,
0484                              const char *name, int len, /* -1 means nul-terminated */
0485                              hb_codepoint_t *glyph,
0486                              void *user_data);
0487 
0488 /**
0489  * hb_font_draw_glyph_or_fail_func_t:
0490  * @font: #hb_font_t to work upon
0491  * @font_data: @font user data pointer
0492  * @glyph: The glyph ID to query
0493  * @draw_funcs: The draw functions to send the shape data to
0494  * @draw_data: The data accompanying the draw functions
0495  * @user_data: User data pointer passed by the caller
0496  *
0497  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0498  *
0499  * Return value: `true` if glyph was drawn, `false` otherwise
0500  *
0501  * XSince: REPLACEME
0502  **/
0503 typedef hb_bool_t (*hb_font_draw_glyph_or_fail_func_t) (hb_font_t *font, void *font_data,
0504                             hb_codepoint_t glyph,
0505                             hb_draw_funcs_t *draw_funcs, void *draw_data,
0506                             void *user_data);
0507 
0508 /**
0509  * hb_font_paint_glyph_or_fail_func_t:
0510  * @font: #hb_font_t to work upon
0511  * @font_data: @font user data pointer
0512  * @glyph: The glyph ID to query
0513  * @paint_funcs: The paint functions to use
0514  * @paint_data: The data accompanying the paint functions
0515  * @palette_index: The color palette to use
0516  * @foreground: The foreground color
0517  * @user_data: User data pointer passed by the caller
0518  *
0519  * A virtual method for the #hb_font_funcs_t of an #hb_font_t object.
0520  *
0521  * Return value: `true` if glyph was painted, `false` otherwise
0522  *
0523  * XSince: REPLACEME
0524  */
0525 typedef hb_bool_t (*hb_font_paint_glyph_or_fail_func_t) (hb_font_t *font, void *font_data,
0526                              hb_codepoint_t glyph,
0527                              hb_paint_funcs_t *paint_funcs, void *paint_data,
0528                              unsigned int palette_index,
0529                              hb_color_t foreground,
0530                              void *user_data);
0531 
0532 /* func setters */
0533 
0534 /**
0535  * hb_font_funcs_set_font_h_extents_func:
0536  * @ffuncs: A font-function structure
0537  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0538  * @user_data: Data to pass to @func
0539  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0540  *
0541  * Sets the implementation function for #hb_font_get_font_h_extents_func_t.
0542  *
0543  * Since: 1.1.2
0544  **/
0545 HB_EXTERN void
0546 hb_font_funcs_set_font_h_extents_func (hb_font_funcs_t *ffuncs,
0547                        hb_font_get_font_h_extents_func_t func,
0548                        void *user_data, hb_destroy_func_t destroy);
0549 
0550 /**
0551  * hb_font_funcs_set_font_v_extents_func:
0552  * @ffuncs: A font-function structure
0553  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0554  * @user_data: Data to pass to @func
0555  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0556  *
0557  * Sets the implementation function for #hb_font_get_font_v_extents_func_t.
0558  *
0559  * Since: 1.1.2
0560  **/
0561 HB_EXTERN void
0562 hb_font_funcs_set_font_v_extents_func (hb_font_funcs_t *ffuncs,
0563                        hb_font_get_font_v_extents_func_t func,
0564                        void *user_data, hb_destroy_func_t destroy);
0565 
0566 /**
0567  * hb_font_funcs_set_nominal_glyph_func:
0568  * @ffuncs: A font-function structure
0569  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0570  * @user_data: Data to pass to @func
0571  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0572  *
0573  * Sets the implementation function for #hb_font_get_nominal_glyph_func_t.
0574  *
0575  * Since: 1.2.3
0576  **/
0577 HB_EXTERN void
0578 hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs,
0579                       hb_font_get_nominal_glyph_func_t func,
0580                       void *user_data, hb_destroy_func_t destroy);
0581 
0582 /**
0583  * hb_font_funcs_set_nominal_glyphs_func:
0584  * @ffuncs: A font-function structure
0585  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0586  * @user_data: Data to pass to @func
0587  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0588  *
0589  * Sets the implementation function for #hb_font_get_nominal_glyphs_func_t.
0590  *
0591  * Since: 2.0.0
0592  **/
0593 HB_EXTERN void
0594 hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t *ffuncs,
0595                        hb_font_get_nominal_glyphs_func_t func,
0596                        void *user_data, hb_destroy_func_t destroy);
0597 
0598 /**
0599  * hb_font_funcs_set_variation_glyph_func:
0600  * @ffuncs: A font-function structure
0601  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0602  * @user_data: Data to pass to @func
0603  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0604  *
0605  * Sets the implementation function for #hb_font_get_variation_glyph_func_t.
0606  *
0607  * Since: 1.2.3
0608  **/
0609 HB_EXTERN void
0610 hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs,
0611                     hb_font_get_variation_glyph_func_t func,
0612                     void *user_data, hb_destroy_func_t destroy);
0613 
0614 /**
0615  * hb_font_funcs_set_glyph_h_advance_func:
0616  * @ffuncs: A font-function structure
0617  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0618  * @user_data: Data to pass to @func
0619  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0620  *
0621  * Sets the implementation function for #hb_font_get_glyph_h_advance_func_t.
0622  *
0623  * Since: 0.9.2
0624  **/
0625 HB_EXTERN void
0626 hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs,
0627                     hb_font_get_glyph_h_advance_func_t func,
0628                     void *user_data, hb_destroy_func_t destroy);
0629 
0630 /**
0631  * hb_font_funcs_set_glyph_v_advance_func:
0632  * @ffuncs: A font-function structure
0633  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0634  * @user_data: Data to pass to @func
0635  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0636  *
0637  * Sets the implementation function for #hb_font_get_glyph_v_advance_func_t.
0638  *
0639  * Since: 0.9.2
0640  **/
0641 HB_EXTERN void
0642 hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs,
0643                     hb_font_get_glyph_v_advance_func_t func,
0644                     void *user_data, hb_destroy_func_t destroy);
0645 
0646 /**
0647  * hb_font_funcs_set_glyph_h_advances_func:
0648  * @ffuncs: A font-function structure
0649  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0650  * @user_data: Data to pass to @func
0651  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0652  *
0653  * Sets the implementation function for #hb_font_get_glyph_h_advances_func_t.
0654  *
0655  * Since: 1.8.6
0656  **/
0657 HB_EXTERN void
0658 hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t *ffuncs,
0659                     hb_font_get_glyph_h_advances_func_t func,
0660                     void *user_data, hb_destroy_func_t destroy);
0661 
0662 /**
0663  * hb_font_funcs_set_glyph_v_advances_func:
0664  * @ffuncs: A font-function structure
0665  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0666  * @user_data: Data to pass to @func
0667  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0668  *
0669  * Sets the implementation function for #hb_font_get_glyph_v_advances_func_t.
0670  *
0671  * Since: 1.8.6
0672  **/
0673 HB_EXTERN void
0674 hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t *ffuncs,
0675                     hb_font_get_glyph_v_advances_func_t func,
0676                     void *user_data, hb_destroy_func_t destroy);
0677 
0678 /**
0679  * hb_font_funcs_set_glyph_h_origin_func:
0680  * @ffuncs: A font-function structure
0681  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0682  * @user_data: Data to pass to @func
0683  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0684  *
0685  * Sets the implementation function for #hb_font_get_glyph_h_origin_func_t.
0686  *
0687  * Since: 0.9.2
0688  **/
0689 HB_EXTERN void
0690 hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs,
0691                        hb_font_get_glyph_h_origin_func_t func,
0692                        void *user_data, hb_destroy_func_t destroy);
0693 
0694 /**
0695  * hb_font_funcs_set_glyph_v_origin_func:
0696  * @ffuncs: A font-function structure
0697  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0698  * @user_data: Data to pass to @func
0699  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0700  *
0701  * Sets the implementation function for #hb_font_get_glyph_v_origin_func_t.
0702  *
0703  * Since: 0.9.2
0704  **/
0705 HB_EXTERN void
0706 hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs,
0707                        hb_font_get_glyph_v_origin_func_t func,
0708                        void *user_data, hb_destroy_func_t destroy);
0709 
0710 /**
0711  * hb_font_funcs_set_glyph_h_kerning_func:
0712  * @ffuncs: A font-function structure
0713  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0714  * @user_data: Data to pass to @func
0715  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0716  *
0717  * Sets the implementation function for #hb_font_get_glyph_h_kerning_func_t.
0718  *
0719  * Since: 0.9.2
0720  **/
0721 HB_EXTERN void
0722 hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs,
0723                     hb_font_get_glyph_h_kerning_func_t func,
0724                     void *user_data, hb_destroy_func_t destroy);
0725 
0726 /**
0727  * hb_font_funcs_set_glyph_extents_func:
0728  * @ffuncs: A font-function structure
0729  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0730  * @user_data: Data to pass to @func
0731  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0732  *
0733  * Sets the implementation function for #hb_font_get_glyph_extents_func_t.
0734  *
0735  * Since: 0.9.2
0736  **/
0737 HB_EXTERN void
0738 hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs,
0739                       hb_font_get_glyph_extents_func_t func,
0740                       void *user_data, hb_destroy_func_t destroy);
0741 
0742 /**
0743  * hb_font_funcs_set_glyph_contour_point_func:
0744  * @ffuncs: A font-function structure
0745  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0746  * @user_data: Data to pass to @func
0747  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0748  *
0749  * Sets the implementation function for #hb_font_get_glyph_contour_point_func_t.
0750  *
0751  * Since: 0.9.2
0752  **/
0753 HB_EXTERN void
0754 hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs,
0755                         hb_font_get_glyph_contour_point_func_t func,
0756                         void *user_data, hb_destroy_func_t destroy);
0757 
0758 /**
0759  * hb_font_funcs_set_glyph_name_func:
0760  * @ffuncs: A font-function structure
0761  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0762  * @user_data: Data to pass to @func
0763  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0764  *
0765  * Sets the implementation function for #hb_font_get_glyph_name_func_t.
0766  *
0767  * Since: 0.9.2
0768  **/
0769 HB_EXTERN void
0770 hb_font_funcs_set_glyph_name_func (hb_font_funcs_t *ffuncs,
0771                    hb_font_get_glyph_name_func_t func,
0772                    void *user_data, hb_destroy_func_t destroy);
0773 
0774 /**
0775  * hb_font_funcs_set_glyph_from_name_func:
0776  * @ffuncs: A font-function structure
0777  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0778  * @user_data: Data to pass to @func
0779  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0780  *
0781  * Sets the implementation function for #hb_font_get_glyph_from_name_func_t.
0782  *
0783  * Since: 0.9.2
0784  **/
0785 HB_EXTERN void
0786 hb_font_funcs_set_glyph_from_name_func (hb_font_funcs_t *ffuncs,
0787                     hb_font_get_glyph_from_name_func_t func,
0788                     void *user_data, hb_destroy_func_t destroy);
0789 
0790 /**
0791  * hb_font_funcs_set_draw_glyph_or_fail_func:
0792  * @ffuncs: A font-function structure
0793  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0794  * @user_data: Data to pass to @func
0795  * @destroy: (nullable): The function to call when @user_data is not needed anymore
0796  *
0797  * Sets the implementation function for #hb_font_draw_glyph_or_fail_func_t.
0798  *
0799  * XSince: REPLACEME
0800  **/
0801 HB_EXTERN void
0802 hb_font_funcs_set_draw_glyph_or_fail_func (hb_font_funcs_t *ffuncs,
0803                        hb_font_draw_glyph_or_fail_func_t func,
0804                        void *user_data, hb_destroy_func_t destroy);
0805 
0806 /**
0807  * hb_font_funcs_set_paint_glyph_or_fail_func:
0808  * @ffuncs: A font-function structure
0809  * @func: (closure user_data) (destroy destroy) (scope notified): The callback function to assign
0810  * @user_data: Data to pass to @func
0811  * @destroy: (nullable): The function to call when @user_data is no longer needed
0812  *
0813  * Sets the implementation function for #hb_font_paint_glyph_or_fail_func_t.
0814  *
0815  * XSince: REPLACEME
0816  */
0817 HB_EXTERN void
0818 hb_font_funcs_set_paint_glyph_or_fail_func (hb_font_funcs_t *ffuncs,
0819                         hb_font_paint_glyph_or_fail_func_t func,
0820                         void *user_data, hb_destroy_func_t destroy);
0821 
0822 /* func dispatch */
0823 
0824 HB_EXTERN hb_bool_t
0825 hb_font_get_h_extents (hb_font_t *font,
0826                hb_font_extents_t *extents);
0827 HB_EXTERN hb_bool_t
0828 hb_font_get_v_extents (hb_font_t *font,
0829                hb_font_extents_t *extents);
0830 
0831 HB_EXTERN hb_bool_t
0832 hb_font_get_nominal_glyph (hb_font_t *font,
0833                hb_codepoint_t unicode,
0834                hb_codepoint_t *glyph);
0835 HB_EXTERN hb_bool_t
0836 hb_font_get_variation_glyph (hb_font_t *font,
0837                  hb_codepoint_t unicode, hb_codepoint_t variation_selector,
0838                  hb_codepoint_t *glyph);
0839 
0840 HB_EXTERN unsigned int
0841 hb_font_get_nominal_glyphs (hb_font_t *font,
0842                 unsigned int count,
0843                 const hb_codepoint_t *first_unicode,
0844                 unsigned int unicode_stride,
0845                 hb_codepoint_t *first_glyph,
0846                 unsigned int glyph_stride);
0847 
0848 HB_EXTERN hb_position_t
0849 hb_font_get_glyph_h_advance (hb_font_t *font,
0850                  hb_codepoint_t glyph);
0851 HB_EXTERN hb_position_t
0852 hb_font_get_glyph_v_advance (hb_font_t *font,
0853                  hb_codepoint_t glyph);
0854 
0855 HB_EXTERN void
0856 hb_font_get_glyph_h_advances (hb_font_t* font,
0857                   unsigned int count,
0858                   const hb_codepoint_t *first_glyph,
0859                   unsigned glyph_stride,
0860                   hb_position_t *first_advance,
0861                   unsigned advance_stride);
0862 HB_EXTERN void
0863 hb_font_get_glyph_v_advances (hb_font_t* font,
0864                   unsigned int count,
0865                   const hb_codepoint_t *first_glyph,
0866                   unsigned glyph_stride,
0867                   hb_position_t *first_advance,
0868                   unsigned advance_stride);
0869 
0870 HB_EXTERN hb_bool_t
0871 hb_font_get_glyph_h_origin (hb_font_t *font,
0872                 hb_codepoint_t glyph,
0873                 hb_position_t *x, hb_position_t *y);
0874 HB_EXTERN hb_bool_t
0875 hb_font_get_glyph_v_origin (hb_font_t *font,
0876                 hb_codepoint_t glyph,
0877                 hb_position_t *x, hb_position_t *y);
0878 
0879 HB_EXTERN hb_position_t
0880 hb_font_get_glyph_h_kerning (hb_font_t *font,
0881                  hb_codepoint_t left_glyph, hb_codepoint_t right_glyph);
0882 
0883 HB_EXTERN hb_bool_t
0884 hb_font_get_glyph_extents (hb_font_t *font,
0885                hb_codepoint_t glyph,
0886                hb_glyph_extents_t *extents);
0887 
0888 HB_EXTERN hb_bool_t
0889 hb_font_get_glyph_contour_point (hb_font_t *font,
0890                  hb_codepoint_t glyph, unsigned int point_index,
0891                  hb_position_t *x, hb_position_t *y);
0892 
0893 HB_EXTERN hb_bool_t
0894 hb_font_get_glyph_name (hb_font_t *font,
0895             hb_codepoint_t glyph,
0896             char *name, unsigned int size);
0897 HB_EXTERN hb_bool_t
0898 hb_font_get_glyph_from_name (hb_font_t *font,
0899                  const char *name, int len, /* -1 means nul-terminated */
0900                  hb_codepoint_t *glyph);
0901 
0902 HB_EXTERN hb_bool_t
0903 hb_font_draw_glyph_or_fail (hb_font_t *font,
0904                 hb_codepoint_t glyph,
0905                 hb_draw_funcs_t *dfuncs, void *draw_data);
0906 
0907 HB_EXTERN hb_bool_t
0908 hb_font_paint_glyph_or_fail (hb_font_t *font,
0909                  hb_codepoint_t glyph,
0910                  hb_paint_funcs_t *pfuncs, void *paint_data,
0911                  unsigned int palette_index,
0912                  hb_color_t foreground);
0913 
0914 /* high-level funcs, with fallback */
0915 
0916 /* Calls either hb_font_get_nominal_glyph() if variation_selector is 0,
0917  * otherwise calls hb_font_get_variation_glyph(). */
0918 HB_EXTERN hb_bool_t
0919 hb_font_get_glyph (hb_font_t *font,
0920            hb_codepoint_t unicode, hb_codepoint_t variation_selector,
0921            hb_codepoint_t *glyph);
0922 
0923 HB_EXTERN void
0924 hb_font_get_extents_for_direction (hb_font_t *font,
0925                    hb_direction_t direction,
0926                    hb_font_extents_t *extents);
0927 HB_EXTERN void
0928 hb_font_get_glyph_advance_for_direction (hb_font_t *font,
0929                      hb_codepoint_t glyph,
0930                      hb_direction_t direction,
0931                      hb_position_t *x, hb_position_t *y);
0932 HB_EXTERN void
0933 hb_font_get_glyph_advances_for_direction (hb_font_t* font,
0934                       hb_direction_t direction,
0935                       unsigned int count,
0936                       const hb_codepoint_t *first_glyph,
0937                       unsigned glyph_stride,
0938                       hb_position_t *first_advance,
0939                       unsigned advance_stride);
0940 HB_EXTERN void
0941 hb_font_get_glyph_origin_for_direction (hb_font_t *font,
0942                     hb_codepoint_t glyph,
0943                     hb_direction_t direction,
0944                     hb_position_t *x, hb_position_t *y);
0945 HB_EXTERN void
0946 hb_font_add_glyph_origin_for_direction (hb_font_t *font,
0947                     hb_codepoint_t glyph,
0948                     hb_direction_t direction,
0949                     hb_position_t *x, hb_position_t *y);
0950 HB_EXTERN void
0951 hb_font_subtract_glyph_origin_for_direction (hb_font_t *font,
0952                          hb_codepoint_t glyph,
0953                          hb_direction_t direction,
0954                          hb_position_t *x, hb_position_t *y);
0955 
0956 HB_EXTERN void
0957 hb_font_get_glyph_kerning_for_direction (hb_font_t *font,
0958                      hb_codepoint_t first_glyph, hb_codepoint_t second_glyph,
0959                      hb_direction_t direction,
0960                      hb_position_t *x, hb_position_t *y);
0961 
0962 HB_EXTERN hb_bool_t
0963 hb_font_get_glyph_extents_for_origin (hb_font_t *font,
0964                       hb_codepoint_t glyph,
0965                       hb_direction_t direction,
0966                       hb_glyph_extents_t *extents);
0967 
0968 HB_EXTERN hb_bool_t
0969 hb_font_get_glyph_contour_point_for_origin (hb_font_t *font,
0970                         hb_codepoint_t glyph, unsigned int point_index,
0971                         hb_direction_t direction,
0972                         hb_position_t *x, hb_position_t *y);
0973 
0974 /* Generates gidDDD if glyph has no name. */
0975 HB_EXTERN void
0976 hb_font_glyph_to_string (hb_font_t *font,
0977              hb_codepoint_t glyph,
0978              char *s, unsigned int size);
0979 /* Parses gidDDD and uniUUUU strings automatically. */
0980 HB_EXTERN hb_bool_t
0981 hb_font_glyph_from_string (hb_font_t *font,
0982                const char *s, int len, /* -1 means nul-terminated */
0983                hb_codepoint_t *glyph);
0984 
0985 /* Older alias for hb_font_draw_glyph_or_fail() with no return value. */
0986 HB_EXTERN void
0987 hb_font_draw_glyph (hb_font_t *font,
0988             hb_codepoint_t glyph,
0989             hb_draw_funcs_t *dfuncs, void *draw_data);
0990 
0991 /* Paints color glyph; if failed, draws outline glyph. */
0992 HB_EXTERN void
0993 hb_font_paint_glyph (hb_font_t *font,
0994              hb_codepoint_t glyph,
0995              hb_paint_funcs_t *pfuncs, void *paint_data,
0996              unsigned int palette_index,
0997              hb_color_t foreground);
0998 
0999 /*
1000  * hb_font_t
1001  */
1002 
1003 /* Fonts are very light-weight objects */
1004 
1005 HB_EXTERN hb_font_t *
1006 hb_font_create (hb_face_t *face);
1007 
1008 HB_EXTERN hb_font_t *
1009 hb_font_create_sub_font (hb_font_t *parent);
1010 
1011 HB_EXTERN hb_font_t *
1012 hb_font_get_empty (void);
1013 
1014 HB_EXTERN hb_font_t *
1015 hb_font_reference (hb_font_t *font);
1016 
1017 HB_EXTERN void
1018 hb_font_destroy (hb_font_t *font);
1019 
1020 HB_EXTERN hb_bool_t
1021 hb_font_set_user_data (hb_font_t          *font,
1022                hb_user_data_key_t *key,
1023                void *              data,
1024                hb_destroy_func_t   destroy,
1025                hb_bool_t           replace);
1026 
1027 
1028 HB_EXTERN void *
1029 hb_font_get_user_data (const hb_font_t    *font,
1030                hb_user_data_key_t *key);
1031 
1032 HB_EXTERN void
1033 hb_font_make_immutable (hb_font_t *font);
1034 
1035 HB_EXTERN hb_bool_t
1036 hb_font_is_immutable (hb_font_t *font);
1037 
1038 HB_EXTERN unsigned int
1039 hb_font_get_serial (hb_font_t *font);
1040 
1041 HB_EXTERN void
1042 hb_font_changed (hb_font_t *font);
1043 
1044 HB_EXTERN void
1045 hb_font_set_parent (hb_font_t *font,
1046             hb_font_t *parent);
1047 
1048 HB_EXTERN hb_font_t *
1049 hb_font_get_parent (hb_font_t *font);
1050 
1051 HB_EXTERN void
1052 hb_font_set_face (hb_font_t *font,
1053           hb_face_t *face);
1054 
1055 HB_EXTERN hb_face_t *
1056 hb_font_get_face (hb_font_t *font);
1057 
1058 
1059 HB_EXTERN void
1060 hb_font_set_funcs (hb_font_t         *font,
1061            hb_font_funcs_t   *klass,
1062            void              *font_data,
1063            hb_destroy_func_t  destroy);
1064 
1065 /* Be *very* careful with this function! */
1066 HB_EXTERN void
1067 hb_font_set_funcs_data (hb_font_t         *font,
1068             void              *font_data,
1069             hb_destroy_func_t  destroy);
1070 
1071 HB_EXTERN hb_bool_t
1072 hb_font_set_funcs_using (hb_font_t  *font,
1073              const char *name);
1074 
1075 HB_EXTERN const char **
1076 hb_font_list_funcs (void);
1077 
1078 HB_EXTERN void
1079 hb_font_set_scale (hb_font_t *font,
1080            int x_scale,
1081            int y_scale);
1082 
1083 HB_EXTERN void
1084 hb_font_get_scale (hb_font_t *font,
1085            int *x_scale,
1086            int *y_scale);
1087 
1088 /*
1089  * A zero value means "no hinting in that direction"
1090  */
1091 HB_EXTERN void
1092 hb_font_set_ppem (hb_font_t *font,
1093           unsigned int x_ppem,
1094           unsigned int y_ppem);
1095 
1096 HB_EXTERN void
1097 hb_font_get_ppem (hb_font_t *font,
1098           unsigned int *x_ppem,
1099           unsigned int *y_ppem);
1100 
1101 /*
1102  * Point size per EM.  Used for optical-sizing in CoreText.
1103  * A value of zero means "not set".
1104  */
1105 HB_EXTERN void
1106 hb_font_set_ptem (hb_font_t *font, float ptem);
1107 
1108 HB_EXTERN float
1109 hb_font_get_ptem (hb_font_t *font);
1110 
1111 HB_EXTERN hb_bool_t
1112 hb_font_is_synthetic (hb_font_t *font);
1113 
1114 HB_EXTERN void
1115 hb_font_set_synthetic_bold (hb_font_t *font,
1116                 float x_embolden, float y_embolden,
1117                 hb_bool_t in_place);
1118 
1119 HB_EXTERN void
1120 hb_font_get_synthetic_bold (hb_font_t *font,
1121                 float *x_embolden, float *y_embolden,
1122                 hb_bool_t *in_place);
1123 
1124 HB_EXTERN void
1125 hb_font_set_synthetic_slant (hb_font_t *font, float slant);
1126 
1127 HB_EXTERN float
1128 hb_font_get_synthetic_slant (hb_font_t *font);
1129 
1130 HB_EXTERN void
1131 hb_font_set_variations (hb_font_t *font,
1132             const hb_variation_t *variations,
1133             unsigned int variations_length);
1134 
1135 HB_EXTERN void
1136 hb_font_set_variation (hb_font_t *font,
1137                hb_tag_t tag,
1138                float    value);
1139 
1140 HB_EXTERN void
1141 hb_font_set_var_coords_design (hb_font_t *font,
1142                    const float *coords,
1143                    unsigned int coords_length);
1144 
1145 HB_EXTERN const float *
1146 hb_font_get_var_coords_design (hb_font_t *font,
1147                    unsigned int *length);
1148 
1149 HB_EXTERN void
1150 hb_font_set_var_coords_normalized (hb_font_t *font,
1151                    const int *coords, /* 2.14 normalized */
1152                    unsigned int coords_length);
1153 
1154 HB_EXTERN const int *
1155 hb_font_get_var_coords_normalized (hb_font_t *font,
1156                    unsigned int *length);
1157 
1158 /**
1159  * HB_FONT_NO_VAR_NAMED_INSTANCE:
1160  *
1161  * Constant signifying that a font does not have any
1162  * named-instance index set.  This is the default of
1163  * a font.
1164  *
1165  * Since: 7.0.0
1166  */
1167 #define HB_FONT_NO_VAR_NAMED_INSTANCE 0xFFFFFFFF
1168 
1169 HB_EXTERN void
1170 hb_font_set_var_named_instance (hb_font_t *font,
1171                 unsigned int instance_index);
1172 
1173 HB_EXTERN unsigned int
1174 hb_font_get_var_named_instance (hb_font_t *font);
1175 
1176 HB_END_DECLS
1177 
1178 #endif /* HB_FONT_H */