[HB] Use nil unicode funcs in nil face
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 11 Aug 2009 03:21:33 +0000 (23:21 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 2 Nov 2009 19:40:38 +0000 (14:40 -0500)
src/hb-font.cc
src/hb-unicode-private.h
src/hb-unicode.c

index ea2216ea0469a0cd9f9690565c43139bbd4ef18d..e56accde7f08d49db1b91cfe5e15407f219e5b20 100644 (file)
 #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 *
index 3dd528ce5c85fa36b1aaf3b91a12769bf3640c06..2793896716cad25de89a7bed0302572cc27e9383 100644 (file)
@@ -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 */
index 47c0396e1b296e307e59f5e148f704cdb13e393c..91da4922d1cda200cb2555fffc1380ffd16777fe 100644 (file)
@@ -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,