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

Unified Diff: third_party/harfbuzz/chromium.patch

Issue 10382212: Fix the alignment issue with Arabic when a font has kerning or cursive gsub. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « third_party/harfbuzz/README.chromium ('k') | third_party/harfbuzz/src/harfbuzz-shaper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/harfbuzz/chromium.patch
===================================================================
--- third_party/harfbuzz/chromium.patch (revision 137574)
+++ third_party/harfbuzz/chromium.patch (working copy)
@@ -133,3 +133,26 @@
static const HB_OpenTypeFeature tibetan_features[] = {
{ HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty },
+diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
+index ce4d4ac..6b4d6d2 100644
+--- a/src/harfbuzz-shaper.cpp
++++ b/src/harfbuzz-shaper.cpp
+@@ -1263,16 +1263,13 @@ HB_Bool HB_OpenTypePosition(HB_ShaperItem *item, int availableGlyphs, HB_Bool do
+ // (int)(positions[i].x_pos >> 6), (int)(positions[i].y_pos >> 6),
+ // positions[i].back, positions[i].new_advance);
+
+- HB_Fixed adjustment = (item->item.bidiLevel % 2) ? -positions[i].x_advance : positions[i].x_advance;
++ HB_Fixed adjustment = positions[i].x_advance;
+
+ if (!(face->current_flags & HB_ShaperFlag_UseDesignMetrics))
+ adjustment = HB_FIXED_ROUND(adjustment);
+
+- if (positions[i].new_advance) {
+- advances[i] = adjustment;
+- } else {
++ if (positions[i].new_advance == 0)
+ advances[i] += adjustment;
+- }
+
+ int back = 0;
+ HB_FixedPoint *offsets = item->offsets;
« no previous file with comments | « third_party/harfbuzz/README.chromium ('k') | third_party/harfbuzz/src/harfbuzz-shaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698