summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrott <drott@chromium.org>2015-10-22 09:41:17 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-22 16:42:05 +0000
commitc6da2801d9e36a9f2bb5acf4e3c492c8f0680ad4 (patch)
tree8b697e2101aaaa3a76e8005752c83c0a5a2d324a
parent760321ccc96f0835adbdc451156f62e0a32c9c55 (diff)
downloadchromium_src-c6da2801d9e36a9f2bb5acf4e3c492c8f0680ad4.zip
chromium_src-c6da2801d9e36a9f2bb5acf4e3c492c8f0680ad4.tar.gz
chromium_src-c6da2801d9e36a9f2bb5acf4e3c492c8f0680ad4.tar.bz2
Cherry pick disabled unicode compatibility decomposition into HarfBuzz
HarfBuzz commit f6799700404c49ae0 disables unicode compatibility decomposition, avoiding undesirable substitutions and allowing Blink to fall back to system fonts for mathematical symbols and the like. Cherry-picking this into our HarfBuzz version in order to be able to land shaper driven segmentation. BUG=546454 R=behdad,eae Review URL: https://codereview.chromium.org/1416013004 Cr-Commit-Position: refs/heads/master@{#355551}
-rw-r--r--third_party/harfbuzz-ng/README.chromium5
-rw-r--r--third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc24
2 files changed, 4 insertions, 25 deletions
diff --git a/third_party/harfbuzz-ng/README.chromium b/third_party/harfbuzz-ng/README.chromium
index 8cb5f43..e228810 100644
--- a/third_party/harfbuzz-ng/README.chromium
+++ b/third_party/harfbuzz-ng/README.chromium
@@ -2,7 +2,7 @@ Name: harfbuzz-ng
Short Name: harfbuzz-ng
URL: http://harfbuzz.org
Version: 1.0.6
-Date: 20151015
+Date: 20151022
Security Critical: yes
License: MIT
License File: COPYING
@@ -19,3 +19,6 @@ and update our build recipes in BUILD.gn and harfbuzz.gyp accordingly, update
the NEWS file from HarfBuzz' release notes, and bump the version numbers
in README.chromium.
+Cherry-picked f6799700404c49ae0a for solving an issue with shaper driven run
+segmentation caused by compatibility decomposition.
+See https://github.com/behdad/harfbuzz/issues/152
diff --git a/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc b/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc
index 09e48e3..4b70a9d 100644
--- a/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc
+++ b/third_party/harfbuzz-ng/src/hb-ot-shape-normalize.cc
@@ -171,28 +171,6 @@ decompose (const hb_ot_shape_normalize_context_t *c, bool shortest, hb_codepoint
return 0;
}
-/* Returns 0 if didn't decompose, number of resulting characters otherwise. */
-static inline unsigned int
-decompose_compatibility (const hb_ot_shape_normalize_context_t *c, hb_codepoint_t u)
-{
- unsigned int len, i;
- hb_codepoint_t decomposed[HB_UNICODE_MAX_DECOMPOSITION_LEN];
- hb_codepoint_t glyphs[HB_UNICODE_MAX_DECOMPOSITION_LEN];
-
- len = c->buffer->unicode->decompose_compatibility (u, decomposed);
- if (!len)
- return 0;
-
- for (i = 0; i < len; i++)
- if (!c->font->get_glyph (decomposed[i], 0, &glyphs[i]))
- return 0;
-
- for (i = 0; i < len; i++)
- output_char (c->buffer, decomposed[i], glyphs[i]);
-
- return len;
-}
-
static inline void
decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shortest)
{
@@ -207,8 +185,6 @@ decompose_current_character (const hb_ot_shape_normalize_context_t *c, bool shor
skip_char (buffer);
else if (!shortest && c->font->get_glyph (u, 0, &glyph))
next_char (buffer, glyph);
- else if (decompose_compatibility (c, u))
- skip_char (buffer);
else
next_char (buffer, glyph); /* glyph is initialized in earlier branches. */
}