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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 * hb_font_funcs_make_immutable: | 350 * hb_font_funcs_make_immutable: |
351 * @ffuncs: font functions. | 351 * @ffuncs: font functions. |
352 * | 352 * |
353 * | 353 * |
354 * | 354 * |
355 * Since: 1.0 | 355 * Since: 1.0 |
356 **/ | 356 **/ |
357 void | 357 void |
358 hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs) | 358 hb_font_funcs_make_immutable (hb_font_funcs_t *ffuncs) |
359 { | 359 { |
360 if (hb_object_is_inert (ffuncs)) | 360 if (unlikely (hb_object_is_inert (ffuncs))) |
361 return; | 361 return; |
362 | 362 |
363 ffuncs->immutable = true; | 363 ffuncs->immutable = true; |
364 } | 364 } |
365 | 365 |
366 /** | 366 /** |
367 * hb_font_funcs_is_immutable: | 367 * hb_font_funcs_is_immutable: |
368 * @ffuncs: font functions. | 368 * @ffuncs: font functions. |
369 * | 369 * |
370 * | 370 * |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 * hb_font_make_immutable: | 1027 * hb_font_make_immutable: |
1028 * @font: a font. | 1028 * @font: a font. |
1029 * | 1029 * |
1030 * | 1030 * |
1031 * | 1031 * |
1032 * Since: 1.0 | 1032 * Since: 1.0 |
1033 **/ | 1033 **/ |
1034 void | 1034 void |
1035 hb_font_make_immutable (hb_font_t *font) | 1035 hb_font_make_immutable (hb_font_t *font) |
1036 { | 1036 { |
1037 if (hb_object_is_inert (font)) | 1037 if (unlikely (hb_object_is_inert (font))) |
1038 return; | 1038 return; |
1039 | 1039 |
1040 font->immutable = true; | 1040 font->immutable = true; |
1041 } | 1041 } |
1042 | 1042 |
1043 /** | 1043 /** |
1044 * hb_font_is_immutable: | 1044 * hb_font_is_immutable: |
1045 * @font: a font. | 1045 * @font: a font. |
1046 * | 1046 * |
1047 * | 1047 * |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 * Since: 1.0 | 1229 * Since: 1.0 |
1230 **/ | 1230 **/ |
1231 void | 1231 void |
1232 hb_font_get_ppem (hb_font_t *font, | 1232 hb_font_get_ppem (hb_font_t *font, |
1233 unsigned int *x_ppem, | 1233 unsigned int *x_ppem, |
1234 unsigned int *y_ppem) | 1234 unsigned int *y_ppem) |
1235 { | 1235 { |
1236 if (x_ppem) *x_ppem = font->x_ppem; | 1236 if (x_ppem) *x_ppem = font->x_ppem; |
1237 if (y_ppem) *y_ppem = font->y_ppem; | 1237 if (y_ppem) *y_ppem = font->y_ppem; |
1238 } | 1238 } |
OLD | NEW |