Imported Upstream version 0.9.12
[platform/upstream/harfbuzz.git] / src / hb-uniscribe.cc
index d732b57..2f01c28 100644 (file)
@@ -33,8 +33,6 @@
 #include <windows.h>
 #include <usp10.h>
 
-typedef ULONG WIN_ULONG;
-
 #include "hb-uniscribe.h"
 
 #include "hb-ot-name-table.hh"
@@ -121,8 +119,8 @@ populate_log_font (LOGFONTW  *lf,
   lf->lfHeight = -font->y_scale;
   lf->lfCharSet = DEFAULT_CHARSET;
 
-  hb_blob_t *blob = Sanitizer<name>::sanitize (hb_face_reference_table (font->face, HB_TAG ('n','a','m','e')));
-  const name *name_table = Sanitizer<name>::lock_instance (blob);
+  hb_blob_t *blob = OT::Sanitizer<OT::name>::sanitize (hb_face_reference_table (font->face, HB_TAG ('n','a','m','e')));
+  const OT::name *name_table = OT::Sanitizer<OT::name>::lock_instance (blob);
   unsigned int len = name_table->get_name (3, 1, 0x409, 4,
                                           lf->lfFaceName,
                                           sizeof (lf->lfFaceName[0]) * LF_FACESIZE)
@@ -190,6 +188,22 @@ _hb_uniscribe_shaper_font_data_destroy (hb_uniscribe_shaper_font_data_t *data)
   free (data);
 }
 
+LOGFONTW *
+hb_uniscribe_font_get_logfontw (hb_font_t *font)
+{
+  if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return NULL;
+  hb_uniscribe_shaper_font_data_t *font_data =  HB_SHAPER_DATA_GET (font);
+  return &font_data->log_font;
+}
+
+HFONT
+hb_uniscribe_font_get_hfont (hb_font_t *font)
+{
+  if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return NULL;
+  hb_uniscribe_shaper_font_data_t *font_data =  HB_SHAPER_DATA_GET (font);
+  return font_data->hfont;
+}
+
 
 /*
  * shaper shape_plan data
@@ -215,23 +229,6 @@ _hb_uniscribe_shaper_shape_plan_data_destroy (hb_uniscribe_shaper_shape_plan_dat
  * shaper
  */
 
-LOGFONTW *
-hb_uniscribe_font_get_logfontw (hb_font_t *font)
-{
-  if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return NULL;
-    return NULL;
-  hb_uniscribe_shaper_font_data_t *font_data =  HB_SHAPER_DATA_GET (font);
-  return &font_data->log_font;
-}
-
-HFONT
-hb_uniscribe_font_get_hfont (hb_font_t *font)
-{
-  if (unlikely (!hb_uniscribe_shaper_font_data_ensure (font))) return NULL;
-  hb_uniscribe_shaper_font_data_t *font_data =  HB_SHAPER_DATA_GET (font);
-  return font_data->hfont;
-}
-
 
 hb_bool_t
 _hb_uniscribe_shape (hb_shape_plan_t    *shape_plan,
@@ -305,7 +302,7 @@ retry:
   SCRIPT_ITEM items[MAX_ITEMS + 1];
   SCRIPT_CONTROL bidi_control = {0};
   SCRIPT_STATE bidi_state = {0};
-  WIN_ULONG script_tags[MAX_ITEMS];
+  ULONG script_tags[MAX_ITEMS];
   int item_count;
 
   /* MinGW32 doesn't define fMergeNeutralItems, so we bruteforce */