| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2009 Red Hat, Inc. | 2 * Copyright © 2009 Red Hat, Inc. |
| 3 * | 3 * |
| 4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
| 5 * | 5 * |
| 6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
| 7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
| 8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
| 9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
| 10 * all copies of this software. | 10 * all copies of this software. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 void | 74 void |
| 75 hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs); | 75 hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs); |
| 76 | 76 |
| 77 hb_bool_t | 77 hb_bool_t |
| 78 hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); | 78 hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs); |
| 79 | 79 |
| 80 | 80 |
| 81 /* glyph extents */ | 81 /* glyph extents */ |
| 82 | 82 |
| 83 /* Note that height is negative in coordinate systems that grow up. */ |
| 83 typedef struct hb_glyph_extents_t | 84 typedef struct hb_glyph_extents_t |
| 84 { | 85 { |
| 85 hb_position_t x_bearing; | 86 hb_position_t x_bearing; /* left side of glyph from origin. */ |
| 86 hb_position_t y_bearing; | 87 hb_position_t y_bearing; /* top side of glyph from origin. */ |
| 87 hb_position_t width; | 88 hb_position_t width; /* distance from left to right side. */ |
| 88 hb_position_t height; | 89 hb_position_t height; /* distance from top to bottom side. */ |
| 89 } hb_glyph_extents_t; | 90 } hb_glyph_extents_t; |
| 90 | 91 |
| 91 | 92 |
| 92 /* func types */ | 93 /* func types */ |
| 93 | 94 |
| 94 typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, | 95 typedef hb_bool_t (*hb_font_get_glyph_func_t) (hb_font_t *font, void *font_data, |
| 95 hb_codepoint_t unicode, hb_codepo
int_t variation_selector, | 96 hb_codepoint_t unicode, hb_codepo
int_t variation_selector, |
| 96 hb_codepoint_t *glyph, | 97 hb_codepoint_t *glyph, |
| 97 void *user_data); | 98 void *user_data); |
| 98 | 99 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 142 |
| 142 /** | 143 /** |
| 143 * hb_font_funcs_set_glyph_func: | 144 * hb_font_funcs_set_glyph_func: |
| 144 * @ffuncs: font functions. | 145 * @ffuncs: font functions. |
| 145 * @func: (closure user_data) (destroy destroy) (scope notified): | 146 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 146 * @user_data: | 147 * @user_data: |
| 147 * @destroy: | 148 * @destroy: |
| 148 * | 149 * |
| 149 * | 150 * |
| 150 * | 151 * |
| 151 * Since: 1.0 | 152 * Since: 0.9.2 |
| 152 **/ | 153 **/ |
| 153 void | 154 void |
| 154 hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, | 155 hb_font_funcs_set_glyph_func (hb_font_funcs_t *ffuncs, |
| 155 hb_font_get_glyph_func_t func, | 156 hb_font_get_glyph_func_t func, |
| 156 void *user_data, hb_destroy_func_t destroy); | 157 void *user_data, hb_destroy_func_t destroy); |
| 157 | 158 |
| 158 /** | 159 /** |
| 159 * hb_font_funcs_set_glyph_h_advance_func: | 160 * hb_font_funcs_set_glyph_h_advance_func: |
| 160 * @ffuncs: font functions. | 161 * @ffuncs: font functions. |
| 161 * @func: (closure user_data) (destroy destroy) (scope notified): | 162 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 162 * @user_data: | 163 * @user_data: |
| 163 * @destroy: | 164 * @destroy: |
| 164 * | 165 * |
| 165 * | 166 * |
| 166 * | 167 * |
| 167 * Since: 1.0 | 168 * Since: 0.9.2 |
| 168 **/ | 169 **/ |
| 169 void | 170 void |
| 170 hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, | 171 hb_font_funcs_set_glyph_h_advance_func (hb_font_funcs_t *ffuncs, |
| 171 hb_font_get_glyph_h_advance_func_t func, | 172 hb_font_get_glyph_h_advance_func_t func, |
| 172 void *user_data, hb_destroy_func_t destr
oy); | 173 void *user_data, hb_destroy_func_t destr
oy); |
| 173 | 174 |
| 174 /** | 175 /** |
| 175 * hb_font_funcs_set_glyph_v_advance_func: | 176 * hb_font_funcs_set_glyph_v_advance_func: |
| 176 * @ffuncs: font functions. | 177 * @ffuncs: font functions. |
| 177 * @func: (closure user_data) (destroy destroy) (scope notified): | 178 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 178 * @user_data: | 179 * @user_data: |
| 179 * @destroy: | 180 * @destroy: |
| 180 * | 181 * |
| 181 * | 182 * |
| 182 * | 183 * |
| 183 * Since: 1.0 | 184 * Since: 0.9.2 |
| 184 **/ | 185 **/ |
| 185 void | 186 void |
| 186 hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, | 187 hb_font_funcs_set_glyph_v_advance_func (hb_font_funcs_t *ffuncs, |
| 187 hb_font_get_glyph_v_advance_func_t func, | 188 hb_font_get_glyph_v_advance_func_t func, |
| 188 void *user_data, hb_destroy_func_t destr
oy); | 189 void *user_data, hb_destroy_func_t destr
oy); |
| 189 | 190 |
| 190 /** | 191 /** |
| 191 * hb_font_funcs_set_glyph_h_origin_func: | 192 * hb_font_funcs_set_glyph_h_origin_func: |
| 192 * @ffuncs: font functions. | 193 * @ffuncs: font functions. |
| 193 * @func: (closure user_data) (destroy destroy) (scope notified): | 194 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 194 * @user_data: | 195 * @user_data: |
| 195 * @destroy: | 196 * @destroy: |
| 196 * | 197 * |
| 197 * | 198 * |
| 198 * | 199 * |
| 199 * Since: 1.0 | 200 * Since: 0.9.2 |
| 200 **/ | 201 **/ |
| 201 void | 202 void |
| 202 hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, | 203 hb_font_funcs_set_glyph_h_origin_func (hb_font_funcs_t *ffuncs, |
| 203 hb_font_get_glyph_h_origin_func_t func, | 204 hb_font_get_glyph_h_origin_func_t func, |
| 204 void *user_data, hb_destroy_func_t destro
y); | 205 void *user_data, hb_destroy_func_t destro
y); |
| 205 | 206 |
| 206 /** | 207 /** |
| 207 * hb_font_funcs_set_glyph_v_origin_func: | 208 * hb_font_funcs_set_glyph_v_origin_func: |
| 208 * @ffuncs: font functions. | 209 * @ffuncs: font functions. |
| 209 * @func: (closure user_data) (destroy destroy) (scope notified): | 210 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 210 * @user_data: | 211 * @user_data: |
| 211 * @destroy: | 212 * @destroy: |
| 212 * | 213 * |
| 213 * | 214 * |
| 214 * | 215 * |
| 215 * Since: 1.0 | 216 * Since: 0.9.2 |
| 216 **/ | 217 **/ |
| 217 void | 218 void |
| 218 hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, | 219 hb_font_funcs_set_glyph_v_origin_func (hb_font_funcs_t *ffuncs, |
| 219 hb_font_get_glyph_v_origin_func_t func, | 220 hb_font_get_glyph_v_origin_func_t func, |
| 220 void *user_data, hb_destroy_func_t destro
y); | 221 void *user_data, hb_destroy_func_t destro
y); |
| 221 | 222 |
| 222 /** | 223 /** |
| 223 * hb_font_funcs_set_glyph_h_kerning_func: | 224 * hb_font_funcs_set_glyph_h_kerning_func: |
| 224 * @ffuncs: font functions. | 225 * @ffuncs: font functions. |
| 225 * @func: (closure user_data) (destroy destroy) (scope notified): | 226 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 226 * @user_data: | 227 * @user_data: |
| 227 * @destroy: | 228 * @destroy: |
| 228 * | 229 * |
| 229 * | 230 * |
| 230 * | 231 * |
| 231 * Since: 1.0 | 232 * Since: 0.9.2 |
| 232 **/ | 233 **/ |
| 233 void | 234 void |
| 234 hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, | 235 hb_font_funcs_set_glyph_h_kerning_func (hb_font_funcs_t *ffuncs, |
| 235 hb_font_get_glyph_h_kerning_func_t func, | 236 hb_font_get_glyph_h_kerning_func_t func, |
| 236 void *user_data, hb_destroy_func_t destr
oy); | 237 void *user_data, hb_destroy_func_t destr
oy); |
| 237 | 238 |
| 238 /** | 239 /** |
| 239 * hb_font_funcs_set_glyph_v_kerning_func: | 240 * hb_font_funcs_set_glyph_v_kerning_func: |
| 240 * @ffuncs: font functions. | 241 * @ffuncs: font functions. |
| 241 * @func: (closure user_data) (destroy destroy) (scope notified): | 242 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 242 * @user_data: | 243 * @user_data: |
| 243 * @destroy: | 244 * @destroy: |
| 244 * | 245 * |
| 245 * | 246 * |
| 246 * | 247 * |
| 247 * Since: 1.0 | 248 * Since: 0.9.2 |
| 248 **/ | 249 **/ |
| 249 void | 250 void |
| 250 hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, | 251 hb_font_funcs_set_glyph_v_kerning_func (hb_font_funcs_t *ffuncs, |
| 251 hb_font_get_glyph_v_kerning_func_t func, | 252 hb_font_get_glyph_v_kerning_func_t func, |
| 252 void *user_data, hb_destroy_func_t destr
oy); | 253 void *user_data, hb_destroy_func_t destr
oy); |
| 253 | 254 |
| 254 /** | 255 /** |
| 255 * hb_font_funcs_set_glyph_extents_func: | 256 * hb_font_funcs_set_glyph_extents_func: |
| 256 * @ffuncs: font functions. | 257 * @ffuncs: font functions. |
| 257 * @func: (closure user_data) (destroy destroy) (scope notified): | 258 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 258 * @user_data: | 259 * @user_data: |
| 259 * @destroy: | 260 * @destroy: |
| 260 * | 261 * |
| 261 * | 262 * |
| 262 * | 263 * |
| 263 * Since: 1.0 | 264 * Since: 0.9.2 |
| 264 **/ | 265 **/ |
| 265 void | 266 void |
| 266 hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, | 267 hb_font_funcs_set_glyph_extents_func (hb_font_funcs_t *ffuncs, |
| 267 hb_font_get_glyph_extents_func_t func, | 268 hb_font_get_glyph_extents_func_t func, |
| 268 void *user_data, hb_destroy_func_t destroy
); | 269 void *user_data, hb_destroy_func_t destroy
); |
| 269 | 270 |
| 270 /** | 271 /** |
| 271 * hb_font_funcs_set_glyph_contour_point_func: | 272 * hb_font_funcs_set_glyph_contour_point_func: |
| 272 * @ffuncs: font functions. | 273 * @ffuncs: font functions. |
| 273 * @func: (closure user_data) (destroy destroy) (scope notified): | 274 * @func: (closure user_data) (destroy destroy) (scope notified): |
| 274 * @user_data: | 275 * @user_data: |
| 275 * @destroy: | 276 * @destroy: |
| 276 * | 277 * |
| 277 * | 278 * |
| 278 * | 279 * |
| 279 * Since: 1.0 | 280 * Since: 0.9.2 |
| 280 **/ | 281 **/ |
| 281 void | 282 void |
| 282 hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, | 283 hb_font_funcs_set_glyph_contour_point_func (hb_font_funcs_t *ffuncs, |
| 283 hb_font_get_glyph_contour_point_func
_t func, | 284 hb_font_get_glyph_contour_point_func
_t func, |
| 284 void *user_data, hb_destroy_func_t d
estroy); | 285 void *user_data, hb_destroy_func_t d
estroy); |
| 285 | 286 |
| 286 /** | 287 /** |
| 287 * hb_font_funcs_set_glyph_name_func: | 288 * hb_font_funcs_set_glyph_name_func: |
| 288 * @ffuncs: font functions. | 289 * @ffuncs: font functions. |
| 289 * @func: (closure user_data) (destroy destroy) (scope notified): | 290 * @func: (closure user_data) (destroy destroy) (scope notified): |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 void * | 452 void * |
| 452 hb_font_get_user_data (hb_font_t *font, | 453 hb_font_get_user_data (hb_font_t *font, |
| 453 hb_user_data_key_t *key); | 454 hb_user_data_key_t *key); |
| 454 | 455 |
| 455 void | 456 void |
| 456 hb_font_make_immutable (hb_font_t *font); | 457 hb_font_make_immutable (hb_font_t *font); |
| 457 | 458 |
| 458 hb_bool_t | 459 hb_bool_t |
| 459 hb_font_is_immutable (hb_font_t *font); | 460 hb_font_is_immutable (hb_font_t *font); |
| 460 | 461 |
| 462 void |
| 463 hb_font_set_parent (hb_font_t *font, |
| 464 hb_font_t *parent); |
| 465 |
| 461 hb_font_t * | 466 hb_font_t * |
| 462 hb_font_get_parent (hb_font_t *font); | 467 hb_font_get_parent (hb_font_t *font); |
| 463 | 468 |
| 464 hb_face_t * | 469 hb_face_t * |
| 465 hb_font_get_face (hb_font_t *font); | 470 hb_font_get_face (hb_font_t *font); |
| 466 | 471 |
| 467 | 472 |
| 468 void | 473 void |
| 469 hb_font_set_funcs (hb_font_t *font, | 474 hb_font_set_funcs (hb_font_t *font, |
| 470 hb_font_funcs_t *klass, | 475 hb_font_funcs_t *klass, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 498 | 503 |
| 499 void | 504 void |
| 500 hb_font_get_ppem (hb_font_t *font, | 505 hb_font_get_ppem (hb_font_t *font, |
| 501 unsigned int *x_ppem, | 506 unsigned int *x_ppem, |
| 502 unsigned int *y_ppem); | 507 unsigned int *y_ppem); |
| 503 | 508 |
| 504 | 509 |
| 505 HB_END_DECLS | 510 HB_END_DECLS |
| 506 | 511 |
| 507 #endif /* HB_FONT_H */ | 512 #endif /* HB_FONT_H */ |
| OLD | NEW |