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

Unified Diff: Source/platform/fonts/shaping/SimpleShaper.cpp

Issue 766053004: text-justify fix for Chinese and Japanese (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: One more NeedsRebaseline for Linux and Win Created 6 years 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 | « Source/platform/fonts/Character.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/shaping/SimpleShaper.cpp
diff --git a/Source/platform/fonts/shaping/SimpleShaper.cpp b/Source/platform/fonts/shaping/SimpleShaper.cpp
index e60432830685c497726631141c47cf33a232c765..4c18b3a7c158248c407792eb91f0aefd1ff312c6 100644
--- a/Source/platform/fonts/shaping/SimpleShaper.cpp
+++ b/Source/platform/fonts/shaping/SimpleShaper.cpp
@@ -105,7 +105,7 @@ float SimpleShaper::adjustSpacing(float width, const CharacterData& charData)
width += m_font->fontDescription().letterSpacing();
bool isExpansionOpportunity = Character::treatAsSpace(charData.character) || (m_run.textJustify() == TextJustifyDistribute);
- if (isExpansionOpportunity) {
+ if (isExpansionOpportunity || (m_run.textJustify() == TextJustifyAuto && Character::isCJKIdeographOrSymbol(charData.character))) {
// Distribute the run's total expansion evenly over all expansion opportunities in the run.
if (m_expansion) {
if (!isExpansionOpportunity && !m_isAfterExpansion) {
« no previous file with comments | « Source/platform/fonts/Character.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698