Fix decompose() implementations to work with non-starter non-composables
[framework/uifw/harfbuzz.git] / src / hb-shape.cc
index fccb81e..1ff830a 100644 (file)
@@ -63,7 +63,7 @@ hb_shape (hb_font_t          *font,
     hb_unicode_funcs_t *unicode = buffer->unicode;
     unsigned int count = buffer->len;
     for (unsigned int i = 0; i < count; i++) {
-      hb_script_t script = unicode->get_script (buffer->info[i].codepoint);
+      hb_script_t script = hb_unicode_script (unicode, buffer->info[i].codepoint);
       if (likely (script != HB_SCRIPT_COMMON &&
                  script != HB_SCRIPT_INHERITED &&
                  script != HB_SCRIPT_UNKNOWN)) {
@@ -79,7 +79,7 @@ hb_shape (hb_font_t          *font,
   }
 
   /* If language is not set, use default language from locale */
-  if (buffer->props.language == NULL) {
+  if (buffer->props.language == HB_LANGUAGE_INVALID) {
     /* TODO get_default_for_script? using $LANGUAGE */
     buffer->props.language = hb_language_get_default ();
   }