| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2009 Red Hat, Inc. | 2 * Copyright © 2009 Red Hat, Inc. |
| 3 * Copyright © 2012 Google, Inc. | 3 * Copyright © 2012 Google, Inc. |
| 4 * | 4 * |
| 5 * This is part of HarfBuzz, a text shaping library. | 5 * This is part of HarfBuzz, a text shaping library. |
| 6 * | 6 * |
| 7 * Permission is hereby granted, without written agreement and without | 7 * Permission is hereby granted, without written agreement and without |
| 8 * license or royalty fees, to use, copy, modify, and distribute this | 8 * license or royalty fees, to use, copy, modify, and distribute this |
| 9 * software and its documentation for any purpose, provided that the | 9 * software and its documentation for any purpose, provided that the |
| 10 * above copyright notice and the following two paragraphs appear in | 10 * above copyright notice and the following two paragraphs appear in |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 * hb_face_make_immutable: | 291 * hb_face_make_immutable: |
| 292 * @face: a face. | 292 * @face: a face. |
| 293 * | 293 * |
| 294 * | 294 * |
| 295 * | 295 * |
| 296 * Since: 1.0 | 296 * Since: 1.0 |
| 297 **/ | 297 **/ |
| 298 void | 298 void |
| 299 hb_face_make_immutable (hb_face_t *face) | 299 hb_face_make_immutable (hb_face_t *face) |
| 300 { | 300 { |
| 301 if (hb_object_is_inert (face)) | 301 if (unlikely (hb_object_is_inert (face))) |
| 302 return; | 302 return; |
| 303 | 303 |
| 304 face->immutable = true; | 304 face->immutable = true; |
| 305 } | 305 } |
| 306 | 306 |
| 307 /** | 307 /** |
| 308 * hb_face_is_immutable: | 308 * hb_face_is_immutable: |
| 309 * @face: a face. | 309 * @face: a face. |
| 310 * | 310 * |
| 311 * | 311 * |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 * @index: | 361 * @index: |
| 362 * | 362 * |
| 363 * | 363 * |
| 364 * | 364 * |
| 365 * Since: 1.0 | 365 * Since: 1.0 |
| 366 **/ | 366 **/ |
| 367 void | 367 void |
| 368 hb_face_set_index (hb_face_t *face, | 368 hb_face_set_index (hb_face_t *face, |
| 369 unsigned int index) | 369 unsigned int index) |
| 370 { | 370 { |
| 371 if (hb_object_is_inert (face)) | 371 if (face->immutable) |
| 372 return; | 372 return; |
| 373 | 373 |
| 374 face->index = index; | 374 face->index = index; |
| 375 } | 375 } |
| 376 | 376 |
| 377 /** | 377 /** |
| 378 * hb_face_get_index: | 378 * hb_face_get_index: |
| 379 * @face: a face. | 379 * @face: a face. |
| 380 * | 380 * |
| 381 * | 381 * |
| (...skipping 14 matching lines...) Expand all Loading... |
| 396 * @upem: | 396 * @upem: |
| 397 * | 397 * |
| 398 * | 398 * |
| 399 * | 399 * |
| 400 * Since: 1.0 | 400 * Since: 1.0 |
| 401 **/ | 401 **/ |
| 402 void | 402 void |
| 403 hb_face_set_upem (hb_face_t *face, | 403 hb_face_set_upem (hb_face_t *face, |
| 404 unsigned int upem) | 404 unsigned int upem) |
| 405 { | 405 { |
| 406 if (hb_object_is_inert (face)) | 406 if (face->immutable) |
| 407 return; | 407 return; |
| 408 | 408 |
| 409 face->upem = upem; | 409 face->upem = upem; |
| 410 } | 410 } |
| 411 | 411 |
| 412 /** | 412 /** |
| 413 * hb_face_get_upem: | 413 * hb_face_get_upem: |
| 414 * @face: a face. | 414 * @face: a face. |
| 415 * | 415 * |
| 416 * | 416 * |
| (...skipping 23 matching lines...) Expand all Loading... |
| 440 * @glyph_count: | 440 * @glyph_count: |
| 441 * | 441 * |
| 442 * | 442 * |
| 443 * | 443 * |
| 444 * Since: 1.0 | 444 * Since: 1.0 |
| 445 **/ | 445 **/ |
| 446 void | 446 void |
| 447 hb_face_set_glyph_count (hb_face_t *face, | 447 hb_face_set_glyph_count (hb_face_t *face, |
| 448 unsigned int glyph_count) | 448 unsigned int glyph_count) |
| 449 { | 449 { |
| 450 if (hb_object_is_inert (face)) | 450 if (face->immutable) |
| 451 return; | 451 return; |
| 452 | 452 |
| 453 face->num_glyphs = glyph_count; | 453 face->num_glyphs = glyph_count; |
| 454 } | 454 } |
| 455 | 455 |
| 456 /** | 456 /** |
| 457 * hb_face_get_glyph_count: | 457 * hb_face_get_glyph_count: |
| 458 * @face: a face. | 458 * @face: a face. |
| 459 * | 459 * |
| 460 * | 460 * |
| (...skipping 11 matching lines...) Expand all Loading... |
| 472 void | 472 void |
| 473 hb_face_t::load_num_glyphs (void) const | 473 hb_face_t::load_num_glyphs (void) const |
| 474 { | 474 { |
| 475 hb_blob_t *maxp_blob = OT::Sanitizer<OT::maxp>::sanitize (reference_table (HB_
OT_TAG_maxp)); | 475 hb_blob_t *maxp_blob = OT::Sanitizer<OT::maxp>::sanitize (reference_table (HB_
OT_TAG_maxp)); |
| 476 const OT::maxp *maxp_table = OT::Sanitizer<OT::maxp>::lock_instance (maxp_blob
); | 476 const OT::maxp *maxp_table = OT::Sanitizer<OT::maxp>::lock_instance (maxp_blob
); |
| 477 num_glyphs = maxp_table->get_num_glyphs (); | 477 num_glyphs = maxp_table->get_num_glyphs (); |
| 478 hb_blob_destroy (maxp_blob); | 478 hb_blob_destroy (maxp_blob); |
| 479 } | 479 } |
| 480 | 480 |
| 481 | 481 |
| OLD | NEW |