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

Unified Diff: Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp

Issue 10154002: Merge 114267 - [chromium] wrong justification for arabic/persian page in cr-win. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp (revision 114705)
+++ Source/WebCore/platform/graphics/chromium/UniscribeHelper.cpp (working copy)
@@ -217,7 +217,18 @@
// The documentation for Scriptjustify is wrong, the parameter is the space
// to add and not the width of the column you want.
- const int minKashida = 1; // How do we decide what this should be?
+ int minKashida;
+#if USE(SKIA_TEXT)
+ // Disable kashida justification based on
+ // http://blogs.msdn.com/b/michkap/archive/2010/08/31/10056140.aspx.
+ for (int i = 0; i < totalGlyphs; ++i) {
+ if (visualAttributes[i].uJustification == SCRIPT_JUSTIFY_ARABIC_KASHIDA)
+ visualAttributes[i].uJustification = SCRIPT_JUSTIFY_NONE;
+ }
+ minKashida = 0;
+#else
+ minKashida = 1; // How do we decide what this should be?
+#endif
ScriptJustify(&visualAttributes[0], &advances[0], totalGlyphs,
additionalSpace, minKashida, &justify[0]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698