diff options
Diffstat (limited to 'src/hb-face.cc')
-rw-r--r-- | src/hb-face.cc | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/hb-face.cc b/src/hb-face.cc index 9effc41..1800c99 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -28,17 +28,11 @@ #include "hb-private.hh" -#include "hb-ot-layout-private.hh" - -#include "hb-font-private.hh" +#include "hb-face-private.hh" #include "hb-open-file-private.hh" #include "hb-ot-head-table.hh" #include "hb-ot-maxp-table.hh" -#include "hb-cache-private.hh" - -#include <string.h> - /* * hb_face_t @@ -57,6 +51,8 @@ const hb_face_t _hb_face_nil = { 1000, /* upem */ 0, /* num_glyphs */ + hb_face_t::NOTHING, /* dirty */ + { #define HB_SHAPER_IMPLEMENT(shaper) HB_SHAPER_DATA_INVALID, #include "hb-shaper-list.hh" @@ -177,7 +173,7 @@ hb_face_create (hb_blob_t *blob, closure, (hb_destroy_func_t) _hb_face_for_data_closure_destroy); - hb_face_set_index (face, index); + face->index = index; return face; } @@ -371,6 +367,11 @@ hb_face_set_index (hb_face_t *face, if (face->immutable) return; + if (face->index == index) + return; + + face->dirty |= face->INDEX; + face->index = index; } @@ -406,6 +407,11 @@ hb_face_set_upem (hb_face_t *face, if (face->immutable) return; + if (face->upem == upem) + return; + + face->dirty |= face->UPEM; + face->upem = upem; } @@ -450,6 +456,11 @@ hb_face_set_glyph_count (hb_face_t *face, if (face->immutable) return; + if (face->num_glyphs == glyph_count) + return; + + face->dirty |= face->NUM_GLYPHS; + face->num_glyphs = glyph_count; } |