diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-08-10 23:21:33 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-08-10 23:21:33 -0400 |
commit | 8b3ad4afc0ce0f4db72142e1a6ee7883e5702dd6 (patch) | |
tree | 3787f91aed27fcf3454a7b6100d5371ac59c0756 | |
parent | 4c1f130ea8328ff492e72b9a0eebbe6a083d7b7a (diff) | |
download | pango-8b3ad4afc0ce0f4db72142e1a6ee7883e5702dd6.tar.gz |
[HB] Use nil unicode funcs in nil face
-rw-r--r-- | pango/opentype/hb-font.cc | 7 | ||||
-rw-r--r-- | pango/opentype/hb-unicode-private.h | 3 | ||||
-rw-r--r-- | pango/opentype/hb-unicode.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/pango/opentype/hb-font.cc b/pango/opentype/hb-font.cc index ea2216ea..e56accde 100644 --- a/pango/opentype/hb-font.cc +++ b/pango/opentype/hb-font.cc @@ -27,11 +27,12 @@ #include "hb-private.h" #include "hb-font-private.h" -#include "hb-ot-layout-private.h" - +#include "hb-unicode-private.h" #include "hb-open-file-private.hh" #include "hb-blob.h" +#include "hb-ot-layout-private.h" + /* * hb_font_funcs_t */ @@ -126,7 +127,7 @@ static hb_face_t _hb_face_nil = { NULL, /* destroy */ NULL, /* user_data */ - NULL /* unicode */ + &_hb_unicode_funcs_nil /* unicode */ }; hb_face_t * diff --git a/pango/opentype/hb-unicode-private.h b/pango/opentype/hb-unicode-private.h index 3dd528ce..27938967 100644 --- a/pango/opentype/hb-unicode-private.h +++ b/pango/opentype/hb-unicode-private.h @@ -47,6 +47,9 @@ struct _hb_unicode_funcs_t { hb_unicode_get_eastasian_width_func_t get_eastasian_width; }; +HB_INTERNAL hb_unicode_funcs_t +_hb_unicode_funcs_nil; + HB_END_DECLS #endif /* HB_UNICODE_PRIVATE_H */ diff --git a/pango/opentype/hb-unicode.c b/pango/opentype/hb-unicode.c index 47c0396e..91da4922 100644 --- a/pango/opentype/hb-unicode.c +++ b/pango/opentype/hb-unicode.c @@ -38,7 +38,7 @@ static hb_script_t hb_unicode_get_script_nil (hb_codepoint_t unicode) { return H static unsigned int hb_unicode_get_combining_class_nil (hb_codepoint_t unicode) { return 0; } static unsigned int hb_unicode_get_eastasian_width_nil (hb_codepoint_t unicode) { return 1; } -static hb_unicode_funcs_t _hb_unicode_funcs_nil = { +hb_unicode_funcs_t _hb_unicode_funcs_nil = { HB_REFERENCE_COUNT_INVALID, /* ref_count */ hb_unicode_get_general_category_nil, |