Index: third_party/harfbuzz-ng/src/hb-shape.cc |
diff --git a/third_party/harfbuzz-ng/src/hb-shape.cc b/third_party/harfbuzz-ng/src/hb-shape.cc |
index 9357f81322b9a7fce9c9e0d27910229621575cae..d97028e71dee56f9d43ce2f7ac1f65c28a6aa877 100644 |
--- a/third_party/harfbuzz-ng/src/hb-shape.cc |
+++ b/third_party/harfbuzz-ng/src/hb-shape.cc |
@@ -31,30 +31,29 @@ |
#include "hb-buffer-private.hh" |
#ifdef HAVE_GRAPHITE |
-#include "hb-graphite2.h" |
+#include "hb-graphite2-private.hh" |
#endif |
#ifdef HAVE_UNISCRIBE |
-# include "hb-uniscribe.h" |
+# include "hb-uniscribe-private.hh" |
#endif |
#ifdef HAVE_OT |
-# include "hb-ot-shape.h" |
+# include "hb-ot-shape-private.hh" |
#endif |
#include "hb-fallback-shape-private.hh" |
typedef hb_bool_t (*hb_shape_func_t) (hb_font_t *font, |
hb_buffer_t *buffer, |
const hb_feature_t *features, |
- unsigned int num_features, |
- const char * const *shaper_options); |
+ unsigned int num_features); |
-#define HB_SHAPER_IMPLEMENT(name) {#name, hb_##name##_shape} |
+#define HB_SHAPER_IMPLEMENT(name) {#name, _hb_##name##_shape} |
static struct hb_shaper_pair_t { |
char name[16]; |
hb_shape_func_t func; |
} shapers[] = { |
/* v--- Add new shapers in the right place here */ |
#ifdef HAVE_GRAPHITE |
- HB_SHAPER_IMPLEMENT (graphite), |
+ HB_SHAPER_IMPLEMENT (graphite2), |
#endif |
#ifdef HAVE_UNISCRIBE |
HB_SHAPER_IMPLEMENT (uniscribe), |
@@ -120,22 +119,19 @@ hb_shape_full (hb_font_t *font, |
hb_buffer_t *buffer, |
const hb_feature_t *features, |
unsigned int num_features, |
- const char * const *shaper_options, |
const char * const *shaper_list) |
{ |
+ hb_font_make_immutable (font); /* So we can safely cache stuff on it */ |
+ |
if (likely (!shaper_list)) { |
for (unsigned int i = 0; i < ARRAY_LENGTH (shapers); i++) |
- if (likely (shapers[i].func (font, buffer, |
- features, num_features, |
- shaper_options))) |
+ if (likely (shapers[i].func (font, buffer, features, num_features))) |
return TRUE; |
} else { |
while (*shaper_list) { |
for (unsigned int i = 0; i < ARRAY_LENGTH (shapers); i++) |
if (0 == strcmp (*shaper_list, shapers[i].name)) { |
- if (likely (shapers[i].func (font, buffer, |
- features, num_features, |
- shaper_options))) |
+ if (likely (shapers[i].func (font, buffer, features, num_features))) |
return TRUE; |
break; |
} |
@@ -151,5 +147,5 @@ hb_shape (hb_font_t *font, |
const hb_feature_t *features, |
unsigned int num_features) |
{ |
- hb_shape_full (font, buffer, features, num_features, NULL, NULL); |
+ hb_shape_full (font, buffer, features, num_features, NULL); |
} |