Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Unified Diff: third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc

Issue 205003003: Update harfbuzz-ng to 0.9.27 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: w/missing files Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-default.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
similarity index 73%
copy from third_party/harfbuzz-ng/src/hb-ot-shape-complex-default.cc
copy to third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
index d6afa0e1c114ef9bf334e6bd1df7f16da4b4396a..6bb6043f652cfd533da2fa857dc771c6b04d424c 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-complex-default.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-complex-hebrew.cc
@@ -27,61 +27,11 @@
#include "hb-ot-shape-complex-private.hh"
-/* TODO Add kana, and other small shapers here */
-
-
-/* The default shaper *only* adds additional per-script features.*/
-
-static const hb_tag_t hangul_features[] =
-{
- HB_TAG('l','j','m','o'),
- HB_TAG('v','j','m','o'),
- HB_TAG('t','j','m','o'),
- HB_TAG_NONE
-};
-
-static const hb_tag_t tibetan_features[] =
-{
- HB_TAG('a','b','v','s'),
- HB_TAG('b','l','w','s'),
- HB_TAG('a','b','v','m'),
- HB_TAG('b','l','w','m'),
- HB_TAG_NONE
-};
-
-static void
-collect_features_default (hb_ot_shape_planner_t *plan)
-{
- const hb_tag_t *script_features = NULL;
-
- switch ((hb_tag_t) plan->props.script)
- {
- /* Unicode-1.1 additions */
- case HB_SCRIPT_HANGUL:
- script_features = hangul_features;
- break;
-
- /* Unicode-2.0 additions */
- case HB_SCRIPT_TIBETAN:
- script_features = tibetan_features;
- break;
- }
-
- for (; script_features && *script_features; script_features++)
- plan->map.add_global_bool_feature (*script_features);
-}
-
-static hb_ot_shape_normalization_mode_t
-normalization_preference_default (const hb_segment_properties_t *props)
-{
- return HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS;
-}
-
static bool
-compose_default (const hb_ot_shape_normalize_context_t *c,
- hb_codepoint_t a,
- hb_codepoint_t b,
- hb_codepoint_t *ab)
+compose_hebrew (const hb_ot_shape_normalize_context_t *c,
+ hb_codepoint_t a,
+ hb_codepoint_t b,
+ hb_codepoint_t *ab)
{
/* Hebrew presentation-form shaping.
* https://bugzilla.mozilla.org/show_bug.cgi?id=728866
@@ -120,7 +70,8 @@ compose_default (const hb_ot_shape_normalize_context_t *c,
bool found = c->unicode->compose (a, b, ab);
- if (!found && (b & ~0x7F) == 0x0580) {
+ if (!found && !c->plan->has_mark)
+ {
/* Special-case Hebrew presentation forms that are excluded from
* standard normalization, but wanted for old fonts. */
switch (b) {
@@ -203,18 +154,19 @@ compose_default (const hb_ot_shape_normalize_context_t *c,
return found;
}
-const hb_ot_complex_shaper_t _hb_ot_complex_shaper_default =
+
+const hb_ot_complex_shaper_t _hb_ot_complex_shaper_hebrew =
{
- "default",
- collect_features_default,
+ "hebrew",
+ NULL, /* collect_features */
NULL, /* override_features */
NULL, /* data_create */
NULL, /* data_destroy */
NULL, /* preprocess_text */
- normalization_preference_default,
+ HB_OT_SHAPE_NORMALIZATION_MODE_DEFAULT,
NULL, /* decompose */
- compose_default,
+ compose_hebrew,
NULL, /* setup_masks */
- HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_LATE,
+ HB_OT_SHAPE_ZERO_WIDTH_MARKS_DEFAULT,
true, /* fallback_position */
};
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-ot-shape-complex-hangul.cc ('k') | third_party/harfbuzz-ng/src/hb-ot-shape-complex-indic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698