Author: jghali
Date: Sun May  3 21:35:58 2020
New Revision: 23685

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23685
Log:
#16100: No line wrap between a CJK character and a Latin character (after a CJK)

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=23685&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp        (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp        Sun May  3 21:35:58 2020
@@ -2170,8 +2170,10 @@
                                const GlyphCluster& nextCluster = 
glyphClusters[i + 1];
                                if (nextCluster.hasFlag(ScLayout_LineBoundary))
                                {
-                                       if 
(!current.glyphs[currentIndex].hasFlag(ScLayout_LineBoundary)
-                                               && 
!current.glyphs[currentIndex].hasFlag(ScLayout_HyphenationPossible)
+                                       // #16100: why preventing possible line 
break when there are two
+                                       // consecutive line break 
opportunities? This is bad for CJK. /
+                                       if 
(/*!current.glyphs[currentIndex].hasFlag(ScLayout_LineBoundary)
+                                               &&*/ 
!current.glyphs[currentIndex].hasFlag(ScLayout_HyphenationPossible)
                                                && (itemText.text(a) != '-')
                                                && (itemText.text(a) != 
SpecialChars::SHYPHEN))
                                        {
@@ -2415,11 +2417,13 @@
                        if ((itemText.text(a) == SpecialChars::COLBREAK) && 
(m_columns > 1))
                                goNextColumn = true;
 
-                       if (i != 0 && 
implicitBreak(itemText.text(glyphClusters[i - 1].lastChar()), 
itemText.text(current.glyphs[currentIndex].firstChar())))
+                       // #16100: this block is useless now that we allow 
remembering break in case of consecutive line break opportunities
+                       // Anyway this block has a bug : it potentially 
remember break for a lower indice than upper code
+                       /*if (i != 0 && 
implicitBreak(itemText.text(glyphClusters[i - 1].lastChar()), 
itemText.text(current.glyphs[currentIndex].firstChar())))
                        {
 //                             qDebug() << "rememberBreak implicitbreak @" << 
i-1;
                                current.rememberBreak(i - 1, breakPos);
-                       }
+                       }*/
                        current.isEmpty = (i - current.lineData.firstCluster + 
1) == 0;
 
                        if (tabs.active)


_______________________________________________
scribus-commit mailing list
[email protected]
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to