src/hb-shape-plan.cc | 2 +- src/hb-uniscribe.cc | 6 +++++- src/hb-uniscribe.h | 4 ---- src/test-would-substitute.cc | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit bb0e4ba3e9c5a407fc5d73c914e429d24d336380 Author: Behdad Esfahbod <[email protected]> Date: Sun Jul 29 17:34:14 2012 -0400 Minor diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc index af3c18d..f9f9f3d 100644 --- a/src/hb-shape-plan.cc +++ b/src/hb-shape-plan.cc @@ -115,7 +115,7 @@ hb_shape_plan_get_empty (void) static const hb_shape_plan_t _hb_shape_plan_nil = { HB_OBJECT_HEADER_STATIC, - TRUE, /* default_shaper_list */ + false, /* default_shaper_list */ NULL, /* face */ _HB_BUFFER_PROPS_DEFAULT, /* props */ diff --git a/src/test-would-substitute.cc b/src/test-would-substitute.cc index 34538bf..2a2c3ef 100644 --- a/src/test-would-substitute.cc +++ b/src/test-would-substitute.cc @@ -60,7 +60,7 @@ main (int argc, char **argv) hb_memory_mode_t mm; #ifdef HAVE_GLIB - GMappedFile *mf = g_mapped_file_new (argv[1], FALSE, NULL); + GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL); font_data = g_mapped_file_get_contents (mf); len = g_mapped_file_get_length (mf); destroy = (hb_destroy_func_t) g_mapped_file_unref; commit a00ad60bc0fe74bf0e11d73da563239f3392f351 Author: Behdad Esfahbod <[email protected]> Date: Sat Jul 28 21:16:08 2012 -0400 [Uniscribe] Remove hb_uniscribe_font_ensure() Wasn't a huge fan of putting the burden on the user. Just remove it and do what we've got to do transparently. diff --git a/src/hb-uniscribe.cc b/src/hb-uniscribe.cc index 7d06a6b..dc2c6d9 100644 --- a/src/hb-uniscribe.cc +++ b/src/hb-uniscribe.cc @@ -58,7 +58,7 @@ DWORD GetFontData( HB_SHAPER_DATA_ENSURE_DECLARE(uniscribe, face) HB_SHAPER_DATA_ENSURE_DECLARE(uniscribe, font) -hb_bool_t +static hb_bool_t hb_uniscribe_font_ensure (hb_font_t *font) { hb_face_t *face = font->face; @@ -223,6 +223,8 @@ _hb_uniscribe_shaper_shape_plan_data_destroy (hb_uniscribe_shaper_shape_plan_dat LOGFONTW * hb_uniscribe_font_get_logfontw (hb_font_t *font) { + if (unlikely (!hb_uniscribe_font_ensure (font))) + return NULL; hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); return &font_data->log_font; } @@ -230,6 +232,8 @@ hb_uniscribe_font_get_logfontw (hb_font_t *font) HFONT hb_uniscribe_font_get_hfont (hb_font_t *font) { + if (unlikely (!hb_uniscribe_font_ensure (font))) + return NULL; hb_uniscribe_shaper_font_data_t *font_data = HB_SHAPER_DATA_GET (font); return font_data->hfont; } diff --git a/src/hb-uniscribe.h b/src/hb-uniscribe.h index 2758dab..bb99f39 100644 --- a/src/hb-uniscribe.h +++ b/src/hb-uniscribe.h @@ -34,10 +34,6 @@ HB_BEGIN_DECLS -/* Must call before all other funtions in this file. Idempotent. */ -hb_bool_t -hb_uniscribe_font_ensure (hb_font_t *font); - LOGFONTW * hb_uniscribe_font_get_logfontw (hb_font_t *font); _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
