93 hb_position_t reserved6; 94 hb_position_t reserved5; 95 hb_position_t reserved4; 96 hb_position_t reserved3; 97 hb_position_t reserved2; 98 hb_position_t reserved1; 99 } hb_font_extents_t; 100 101 /* Note that height is negative in coordinate systems that grow up. */ 102 typedef struct hb_glyph_extents_t 103 { 104 hb_position_t x_bearing; /* left side of glyph from origin. */ 105 hb_position_t y_bearing; /* top side of glyph from origin. */ 106 hb_position_t width; /* distance from left to right side. */ 107 hb_position_t height; /* distance from top to bottom side. */ 108 } hb_glyph_extents_t; 109 110 /* func types */ 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 *metrics, 114 void *user_data); 115 typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t; 116 typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t; 117 118 119 typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data, 120 hb_codepoint_t unicode, 121 hb_codepoint_t *glyph, 122 void *user_data); 123 typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data, 124 hb_codepoint_t unicode, hb_codepoint_t variation_selector, 125 hb_codepoint_t *glyph, 126 void *user_data); 127 128 129 typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, 130 hb_codepoint_t glyph, 131 void *user_data); 132 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t; 133 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; 134 135 typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data, 136 hb_codepoint_t glyph, 137 hb_position_t *x, hb_position_t *y, 138 void *user_data); 139 typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t; 140 typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t; 141 142 typedef hb_position_t (*hb_font_get_glyph_kerning_func_t) (hb_font_t *font, void *font_data, 143 hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, 144 void *user_data); 145 typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_h_kerning_func_t; 146 typedef hb_font_get_glyph_kerning_func_t hb_font_get_glyph_v_kerning_func_t; 147 148 149 typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data, 150 hb_codepoint_t glyph, 151 hb_glyph_extents_t *extents, 152 void *user_data); 153 typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data, 154 hb_codepoint_t glyph, unsigned int point_index, 155 hb_position_t *x, hb_position_t *y, 156 void *user_data); 157 158 159 typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, 160 hb_codepoint_t glyph, 161 char *name, unsigned int size, 162 void *user_data); 163 typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, 164 const char *name, int len, /* -1 means nul-terminated */ 165 hb_codepoint_t *glyph, 166 void *user_data); 167 200 hb_font_get_font_v_extents_func_t func, 201 void *user_data, hb_destroy_func_t destroy); 202 203 /** 204 * hb_font_funcs_set_nominal_glyph_func: 205 * @ffuncs: font functions. 206 * @func: (closure user_data) (destroy destroy) (scope notified): 207 * @user_data: 208 * @destroy: 209 * 210 * 211 * 212 * Since: 1.2.3 213 **/ 214 HB_EXTERN void 215 hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs, 216 hb_font_get_nominal_glyph_func_t func, 217 void *user_data, hb_destroy_func_t destroy); 218 219 /** 220 * hb_font_funcs_set_variation_glyph_func: 221 * @ffuncs: font functions. 222 * @func: (closure user_data) (destroy destroy) (scope notified): 223 * @user_data: 224 * @destroy: 225 * 226 * 227 * 228 * Since: 1.2.3 229 **/ 230 HB_EXTERN void 231 hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs, 232 hb_font_get_variation_glyph_func_t func, 233 void *user_data, hb_destroy_func_t destroy); 234 235 /** 236 * hb_font_funcs_set_glyph_h_advance_func: 237 * @ffuncs: font functions. 238 * @func: (closure user_data) (destroy destroy) (scope notified): 239 * @user_data: 248 hb_font_get_glyph_h_advance_func_t func, 249 void *user_data, hb_destroy_func_t destroy); 250 251 /** 252 * hb_font_funcs_set_glyph_v_advance_func: 253 * @ffuncs: font functions. 254 * @func: (closure user_data) (destroy destroy) (scope notified): 255 * @user_data: 256 * @destroy: 257 * 258 * 259 * 260 * Since: 0.9.2 261 **/ 262 HB_EXTERN void 263 hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, 264 hb_font_get_glyph_v_advance_func_t func, 265 void *user_data, hb_destroy_func_t destroy); 266 267 /** 268 * hb_font_funcs_set_glyph_h_origin_func: 269 * @ffuncs: font functions. 270 * @func: (closure user_data) (destroy destroy) (scope notified): 271 * @user_data: 272 * @destroy: 273 * 274 * 275 * 276 * Since: 0.9.2 277 **/ 278 HB_EXTERN void 279 hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, 280 hb_font_get_glyph_h_origin_func_t func, 281 void *user_data, hb_destroy_func_t destroy); 282 283 /** 284 * hb_font_funcs_set_glyph_v_origin_func: 285 * @ffuncs: font functions. 286 * @func: (closure user_data) (destroy destroy) (scope notified): 287 * @user_data: 288 * @destroy: 289 * 290 * 291 * 292 * Since: 0.9.2 293 **/ 294 HB_EXTERN void 295 hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, 296 hb_font_get_glyph_v_origin_func_t func, 297 void *user_data, hb_destroy_func_t destroy); 298 299 /** 300 * hb_font_funcs_set_glyph_h_kerning_func: 301 * @ffuncs: font functions. 302 * @func: (closure user_data) (destroy destroy) (scope notified): 303 * @user_data: 304 * @destroy: 305 * 306 * 307 * 308 * Since: 0.9.2 309 **/ 310 HB_EXTERN void 311 hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, 312 hb_font_get_glyph_h_kerning_func_t func, 313 void *user_data, hb_destroy_func_t destroy); 314 315 /** 316 * hb_font_funcs_set_glyph_v_kerning_func: 317 * @ffuncs: font functions. 318 * @func: (closure user_data) (destroy destroy) (scope notified): 319 * @user_data: 320 * @destroy: 321 * 322 * 323 * 324 * Since: 0.9.2 325 **/ 326 HB_EXTERN void 327 hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, 328 hb_font_get_glyph_v_kerning_func_t func, 329 void *user_data, hb_destroy_func_t destroy); 330 331 /** 332 * hb_font_funcs_set_glyph_extents_func: 333 * @ffuncs: font functions. 334 * @func: (closure user_data) (destroy destroy) (scope notified): 335 * @user_data: 336 * @destroy: 337 * 338 * 339 * 340 * Since: 0.9.2 341 **/ 342 HB_EXTERN void 343 hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, 344 hb_font_get_glyph_extents_func_t func, 345 void *user_data, hb_destroy_func_t destroy); 346 347 /** 348 * hb_font_funcs_set_glyph_contour_point_func: 400 HB_EXTERN hb_bool_t 401 hb_font_get_v_extents (hb_font_t *font, 402 hb_font_extents_t *extents); 403 404 HB_EXTERN hb_bool_t 405 hb_font_get_nominal_glyph (hb_font_t *font, 406 hb_codepoint_t unicode, 407 hb_codepoint_t *glyph); 408 HB_EXTERN hb_bool_t 409 hb_font_get_variation_glyph (hb_font_t *font, 410 hb_codepoint_t unicode, hb_codepoint_t variation_selector, 411 hb_codepoint_t *glyph); 412 413 HB_EXTERN hb_position_t 414 hb_font_get_glyph_h_advance (hb_font_t *font, 415 hb_codepoint_t glyph); 416 HB_EXTERN hb_position_t 417 hb_font_get_glyph_v_advance (hb_font_t *font, 418 hb_codepoint_t glyph); 419 420 HB_EXTERN hb_bool_t 421 hb_font_get_glyph_h_origin (hb_font_t *font, 422 hb_codepoint_t glyph, 423 hb_position_t *x, hb_position_t *y); 424 HB_EXTERN hb_bool_t 425 hb_font_get_glyph_v_origin (hb_font_t *font, 426 hb_codepoint_t glyph, 427 hb_position_t *x, hb_position_t *y); 428 429 HB_EXTERN hb_position_t 430 hb_font_get_glyph_h_kerning (hb_font_t *font, 431 hb_codepoint_t left_glyph, hb_codepoint_t right_glyph); 432 HB_EXTERN hb_position_t 433 hb_font_get_glyph_v_kerning (hb_font_t *font, 434 hb_codepoint_t top_glyph, hb_codepoint_t bottom_glyph); 435 436 HB_EXTERN hb_bool_t 437 hb_font_get_glyph_extents (hb_font_t *font, 438 hb_codepoint_t glyph, 439 hb_glyph_extents_t *extents); 440 441 HB_EXTERN hb_bool_t 442 hb_font_get_glyph_contour_point (hb_font_t *font, 443 hb_codepoint_t glyph, unsigned int point_index, 444 hb_position_t *x, hb_position_t *y); 445 446 HB_EXTERN hb_bool_t 447 hb_font_get_glyph_name (hb_font_t *font, 448 hb_codepoint_t glyph, 449 char *name, unsigned int size); 450 HB_EXTERN hb_bool_t 451 hb_font_get_glyph_from_name (hb_font_t *font, 452 const char *name, int len, /* -1 means nul-terminated */ 453 hb_codepoint_t *glyph); 454 455 456 /* high-level funcs, with fallback */ 457 458 /* Calls either hb_font_get_nominal_glyph() if variation_selector is 0, 459 * otherwise calls hb_font_get_variation_glyph(). */ 460 HB_EXTERN hb_bool_t 461 hb_font_get_glyph (hb_font_t *font, 462 hb_codepoint_t unicode, hb_codepoint_t variation_selector, 463 hb_codepoint_t *glyph); 464 465 HB_EXTERN void 466 hb_font_get_extents_for_direction (hb_font_t *font, 467 hb_direction_t direction, 468 hb_font_extents_t *extents); 469 HB_EXTERN void 470 hb_font_get_glyph_advance_for_direction (hb_font_t *font, 471 hb_codepoint_t glyph, 472 hb_direction_t direction, 473 hb_position_t *x, hb_position_t *y); 474 HB_EXTERN void 475 hb_font_get_glyph_origin_for_direction (hb_font_t *font, 476 hb_codepoint_t glyph, 477 hb_direction_t direction, 478 hb_position_t *x, hb_position_t *y); 479 HB_EXTERN void 480 hb_font_add_glyph_origin_for_direction (hb_font_t *font, 481 hb_codepoint_t glyph, 482 hb_direction_t direction, 483 hb_position_t *x, hb_position_t *y); 484 HB_EXTERN void 485 hb_font_subtract_glyph_origin_for_direction (hb_font_t *font, 486 hb_codepoint_t glyph, 487 hb_direction_t direction, 488 hb_position_t *x, hb_position_t *y); 489 490 HB_EXTERN void 491 hb_font_get_glyph_kerning_for_direction (hb_font_t *font, 492 hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, 493 hb_direction_t direction, 494 hb_position_t *x, hb_position_t *y); 495 496 HB_EXTERN hb_bool_t 497 hb_font_get_glyph_extents_for_origin (hb_font_t *font, 498 hb_codepoint_t glyph, 499 hb_direction_t direction, 500 hb_glyph_extents_t *extents); 501 502 HB_EXTERN hb_bool_t 503 hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, 504 hb_codepoint_t glyph, unsigned int point_index, 505 hb_direction_t direction, 506 hb_position_t *x, hb_position_t *y); 507 508 /* Generates gidDDD if glyph has no name. */ 509 HB_EXTERN void 510 hb_font_glyph_to_string (hb_font_t *font, 511 hb_codepoint_t glyph, 512 char *s, unsigned int size); 513 /* Parses gidDDD and uniUUUU strings automatically. */ 514 HB_EXTERN hb_bool_t | 93 hb_position_t reserved6; 94 hb_position_t reserved5; 95 hb_position_t reserved4; 96 hb_position_t reserved3; 97 hb_position_t reserved2; 98 hb_position_t reserved1; 99 } hb_font_extents_t; 100 101 /* Note that height is negative in coordinate systems that grow up. */ 102 typedef struct hb_glyph_extents_t 103 { 104 hb_position_t x_bearing; /* left side of glyph from origin. */ 105 hb_position_t y_bearing; /* top side of glyph from origin. */ 106 hb_position_t width; /* distance from left to right side. */ 107 hb_position_t height; /* distance from top to bottom side. */ 108 } hb_glyph_extents_t; 109 110 /* func types */ 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 typedef hb_font_get_font_extents_func_t hb_font_get_font_h_extents_func_t; 116 typedef hb_font_get_font_extents_func_t hb_font_get_font_v_extents_func_t; 117 118 119 typedef hb_bool_t (*hb_font_get_nominal_glyph_func_t) (hb_font_t *font, void *font_data, 120 hb_codepoint_t unicode, 121 hb_codepoint_t *glyph, 122 void *user_data); 123 typedef hb_bool_t (*hb_font_get_variation_glyph_func_t) (hb_font_t *font, void *font_data, 124 hb_codepoint_t unicode, hb_codepoint_t variation_selector, 125 hb_codepoint_t *glyph, 126 void *user_data); 127 128 typedef unsigned int (*hb_font_get_nominal_glyphs_func_t) (hb_font_t *font, void *font_data, 129 unsigned int count, 130 const hb_codepoint_t *first_unicode, 131 unsigned int unicode_stride, 132 hb_codepoint_t *first_glyph, 133 unsigned int glyph_stride, 134 void *user_data); 135 136 137 typedef hb_position_t (*hb_font_get_glyph_advance_func_t) (hb_font_t *font, void *font_data, 138 hb_codepoint_t glyph, 139 void *user_data); 140 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_h_advance_func_t; 141 typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; 142 143 typedef void (*hb_font_get_glyph_advances_func_t) (hb_font_t* font, void* font_data, 144 unsigned int count, 145 const hb_codepoint_t *first_glyph, 146 unsigned glyph_stride, 147 hb_position_t *first_advance, 148 unsigned advance_stride, 149 void *user_data); 150 typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_h_advances_func_t; 151 typedef hb_font_get_glyph_advances_func_t hb_font_get_glyph_v_advances_func_t; 152 153 typedef hb_bool_t (*hb_font_get_glyph_origin_func_t) (hb_font_t *font, void *font_data, 154 hb_codepoint_t glyph, 155 hb_position_t *x, hb_position_t *y, 156 void *user_data); 157 typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_h_origin_func_t; 158 typedef hb_font_get_glyph_origin_func_t hb_font_get_glyph_v_origin_func_t; 159 160 161 typedef hb_bool_t (*hb_font_get_glyph_extents_func_t) (hb_font_t *font, void *font_data, 162 hb_codepoint_t glyph, 163 hb_glyph_extents_t *extents, 164 void *user_data); 165 typedef hb_bool_t (*hb_font_get_glyph_contour_point_func_t) (hb_font_t *font, void *font_data, 166 hb_codepoint_t glyph, unsigned int point_index, 167 hb_position_t *x, hb_position_t *y, 168 void *user_data); 169 170 171 typedef hb_bool_t (*hb_font_get_glyph_name_func_t) (hb_font_t *font, void *font_data, 172 hb_codepoint_t glyph, 173 char *name, unsigned int size, 174 void *user_data); 175 typedef hb_bool_t (*hb_font_get_glyph_from_name_func_t) (hb_font_t *font, void *font_data, 176 const char *name, int len, /* -1 means nul-terminated */ 177 hb_codepoint_t *glyph, 178 void *user_data); 179 212 hb_font_get_font_v_extents_func_t func, 213 void *user_data, hb_destroy_func_t destroy); 214 215 /** 216 * hb_font_funcs_set_nominal_glyph_func: 217 * @ffuncs: font functions. 218 * @func: (closure user_data) (destroy destroy) (scope notified): 219 * @user_data: 220 * @destroy: 221 * 222 * 223 * 224 * Since: 1.2.3 225 **/ 226 HB_EXTERN void 227 hb_font_funcs_set_nominal_glyph_func (hb_font_funcs_t *ffuncs, 228 hb_font_get_nominal_glyph_func_t func, 229 void *user_data, hb_destroy_func_t destroy); 230 231 /** 232 * hb_font_funcs_set_nominal_glyphs_func: 233 * @ffuncs: font functions. 234 * @func: (closure user_data) (destroy destroy) (scope notified): 235 * @user_data: 236 * @destroy: 237 * 238 * 239 * 240 * Since: 2.0.0 241 **/ 242 HB_EXTERN void 243 hb_font_funcs_set_nominal_glyphs_func (hb_font_funcs_t *ffuncs, 244 hb_font_get_nominal_glyphs_func_t func, 245 void *user_data, hb_destroy_func_t destroy); 246 247 /** 248 * hb_font_funcs_set_variation_glyph_func: 249 * @ffuncs: font functions. 250 * @func: (closure user_data) (destroy destroy) (scope notified): 251 * @user_data: 252 * @destroy: 253 * 254 * 255 * 256 * Since: 1.2.3 257 **/ 258 HB_EXTERN void 259 hb_font_funcs_set_variation_glyph_func (hb_font_funcs_t *ffuncs, 260 hb_font_get_variation_glyph_func_t func, 261 void *user_data, hb_destroy_func_t destroy); 262 263 /** 264 * hb_font_funcs_set_glyph_h_advance_func: 265 * @ffuncs: font functions. 266 * @func: (closure user_data) (destroy destroy) (scope notified): 267 * @user_data: 276 hb_font_get_glyph_h_advance_func_t func, 277 void *user_data, hb_destroy_func_t destroy); 278 279 /** 280 * hb_font_funcs_set_glyph_v_advance_func: 281 * @ffuncs: font functions. 282 * @func: (closure user_data) (destroy destroy) (scope notified): 283 * @user_data: 284 * @destroy: 285 * 286 * 287 * 288 * Since: 0.9.2 289 **/ 290 HB_EXTERN void 291 hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, 292 hb_font_get_glyph_v_advance_func_t func, 293 void *user_data, hb_destroy_func_t destroy); 294 295 /** 296 * hb_font_funcs_set_glyph_h_advances_func: 297 * @ffuncs: font functions. 298 * @func: (closure user_data) (destroy destroy) (scope notified): 299 * @user_data: 300 * @destroy: 301 * 302 * 303 * 304 * Since: 1.8.6 305 **/ 306 HB_EXTERN void 307 hb_font_funcs_set_glyph_h_advances_func (hb_font_funcs_t *ffuncs, 308 hb_font_get_glyph_h_advances_func_t func, 309 void *user_data, hb_destroy_func_t destroy); 310 311 /** 312 * hb_font_funcs_set_glyph_v_advances_func: 313 * @ffuncs: font functions. 314 * @func: (closure user_data) (destroy destroy) (scope notified): 315 * @user_data: 316 * @destroy: 317 * 318 * 319 * 320 * Since: 1.8.6 321 **/ 322 HB_EXTERN void 323 hb_font_funcs_set_glyph_v_advances_func (hb_font_funcs_t *ffuncs, 324 hb_font_get_glyph_v_advances_func_t func, 325 void *user_data, hb_destroy_func_t destroy); 326 327 /** 328 * hb_font_funcs_set_glyph_h_origin_func: 329 * @ffuncs: font functions. 330 * @func: (closure user_data) (destroy destroy) (scope notified): 331 * @user_data: 332 * @destroy: 333 * 334 * 335 * 336 * Since: 0.9.2 337 **/ 338 HB_EXTERN void 339 hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, 340 hb_font_get_glyph_h_origin_func_t func, 341 void *user_data, hb_destroy_func_t destroy); 342 343 /** 344 * hb_font_funcs_set_glyph_v_origin_func: 345 * @ffuncs: font functions. 346 * @func: (closure user_data) (destroy destroy) (scope notified): 347 * @user_data: 348 * @destroy: 349 * 350 * 351 * 352 * Since: 0.9.2 353 **/ 354 HB_EXTERN void 355 hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, 356 hb_font_get_glyph_v_origin_func_t func, 357 void *user_data, hb_destroy_func_t destroy); 358 359 /** 360 * hb_font_funcs_set_glyph_extents_func: 361 * @ffuncs: font functions. 362 * @func: (closure user_data) (destroy destroy) (scope notified): 363 * @user_data: 364 * @destroy: 365 * 366 * 367 * 368 * Since: 0.9.2 369 **/ 370 HB_EXTERN void 371 hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, 372 hb_font_get_glyph_extents_func_t func, 373 void *user_data, hb_destroy_func_t destroy); 374 375 /** 376 * hb_font_funcs_set_glyph_contour_point_func: 428 HB_EXTERN hb_bool_t 429 hb_font_get_v_extents (hb_font_t *font, 430 hb_font_extents_t *extents); 431 432 HB_EXTERN hb_bool_t 433 hb_font_get_nominal_glyph (hb_font_t *font, 434 hb_codepoint_t unicode, 435 hb_codepoint_t *glyph); 436 HB_EXTERN hb_bool_t 437 hb_font_get_variation_glyph (hb_font_t *font, 438 hb_codepoint_t unicode, hb_codepoint_t variation_selector, 439 hb_codepoint_t *glyph); 440 441 HB_EXTERN hb_position_t 442 hb_font_get_glyph_h_advance (hb_font_t *font, 443 hb_codepoint_t glyph); 444 HB_EXTERN hb_position_t 445 hb_font_get_glyph_v_advance (hb_font_t *font, 446 hb_codepoint_t glyph); 447 448 HB_EXTERN void 449 hb_font_get_glyph_h_advances (hb_font_t* font, 450 unsigned int count, 451 const hb_codepoint_t *first_glyph, 452 unsigned glyph_stride, 453 hb_position_t *first_advance, 454 unsigned advance_stride); 455 HB_EXTERN void 456 hb_font_get_glyph_v_advances (hb_font_t* font, 457 unsigned int count, 458 const hb_codepoint_t *first_glyph, 459 unsigned glyph_stride, 460 hb_position_t *first_advance, 461 unsigned advance_stride); 462 463 HB_EXTERN hb_bool_t 464 hb_font_get_glyph_h_origin (hb_font_t *font, 465 hb_codepoint_t glyph, 466 hb_position_t *x, hb_position_t *y); 467 HB_EXTERN hb_bool_t 468 hb_font_get_glyph_v_origin (hb_font_t *font, 469 hb_codepoint_t glyph, 470 hb_position_t *x, hb_position_t *y); 471 472 HB_EXTERN hb_bool_t 473 hb_font_get_glyph_extents (hb_font_t *font, 474 hb_codepoint_t glyph, 475 hb_glyph_extents_t *extents); 476 477 HB_EXTERN hb_bool_t 478 hb_font_get_glyph_contour_point (hb_font_t *font, 479 hb_codepoint_t glyph, unsigned int point_index, 480 hb_position_t *x, hb_position_t *y); 481 482 HB_EXTERN hb_bool_t 483 hb_font_get_glyph_name (hb_font_t *font, 484 hb_codepoint_t glyph, 485 char *name, unsigned int size); 486 HB_EXTERN hb_bool_t 487 hb_font_get_glyph_from_name (hb_font_t *font, 488 const char *name, int len, /* -1 means nul-terminated */ 489 hb_codepoint_t *glyph); 490 491 492 /* high-level funcs, with fallback */ 493 494 /* Calls either hb_font_get_nominal_glyph() if variation_selector is 0, 495 * otherwise calls hb_font_get_variation_glyph(). */ 496 HB_EXTERN hb_bool_t 497 hb_font_get_glyph (hb_font_t *font, 498 hb_codepoint_t unicode, hb_codepoint_t variation_selector, 499 hb_codepoint_t *glyph); 500 501 HB_EXTERN void 502 hb_font_get_extents_for_direction (hb_font_t *font, 503 hb_direction_t direction, 504 hb_font_extents_t *extents); 505 HB_EXTERN void 506 hb_font_get_glyph_advance_for_direction (hb_font_t *font, 507 hb_codepoint_t glyph, 508 hb_direction_t direction, 509 hb_position_t *x, hb_position_t *y); 510 HB_EXTERN void 511 hb_font_get_glyph_advances_for_direction (hb_font_t* font, 512 hb_direction_t direction, 513 unsigned int count, 514 const hb_codepoint_t *first_glyph, 515 unsigned glyph_stride, 516 hb_position_t *first_advance, 517 unsigned advance_stride); 518 HB_EXTERN void 519 hb_font_get_glyph_origin_for_direction (hb_font_t *font, 520 hb_codepoint_t glyph, 521 hb_direction_t direction, 522 hb_position_t *x, hb_position_t *y); 523 HB_EXTERN void 524 hb_font_add_glyph_origin_for_direction (hb_font_t *font, 525 hb_codepoint_t glyph, 526 hb_direction_t direction, 527 hb_position_t *x, hb_position_t *y); 528 HB_EXTERN void 529 hb_font_subtract_glyph_origin_for_direction (hb_font_t *font, 530 hb_codepoint_t glyph, 531 hb_direction_t direction, 532 hb_position_t *x, hb_position_t *y); 533 534 HB_EXTERN hb_bool_t 535 hb_font_get_glyph_extents_for_origin (hb_font_t *font, 536 hb_codepoint_t glyph, 537 hb_direction_t direction, 538 hb_glyph_extents_t *extents); 539 540 HB_EXTERN hb_bool_t 541 hb_font_get_glyph_contour_point_for_origin (hb_font_t *font, 542 hb_codepoint_t glyph, unsigned int point_index, 543 hb_direction_t direction, 544 hb_position_t *x, hb_position_t *y); 545 546 /* Generates gidDDD if glyph has no name. */ 547 HB_EXTERN void 548 hb_font_glyph_to_string (hb_font_t *font, 549 hb_codepoint_t glyph, 550 char *s, unsigned int size); 551 /* Parses gidDDD and uniUUUU strings automatically. */ 552 HB_EXTERN hb_bool_t |