View Issue Details

IDProjectCategoryView StatusLast Update
0012928ScribusStory Editor / Text Framespublic2015-03-02 15:07
Reporterftake Assigned Tocbradney  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSopenSUSEOS Version13.2
Product Version1.5.0svn 
Fixed in Version1.5.0svn 
Summary0012928: Insufficient justification of Japanese text
DescriptionDue to the commit for 0010292, implicit spaces are inserted between Chinese characters. However, no spaces between the other letters used in Japanese, such as Hiragana and Katakana.

Moreover, some symbols that cannot be placed before/after line break are missing in the condition.
Additional InformationI made a patch to resolve this issue and using Scribus 1.4.x that contains the
patch. It works fine to me.

https://build.opensuse.org/package/show/home:ftake:scribus/scribus

Note that I think the existing checkCJK* functions are redundant and should be merged into specialchars.cpp.
TagsNo tags attached.
PatchYes

Activities

ftake

2015-02-22 14:04

reporter  

japanese-breaking-and-alignment.patch (1,318 bytes)   
--- scribus-1.4.4.mod/scribus/pageitem_textframe.cpp	2014-12-06 02:13:59.599941139 +0900
+++ scribus-1.4.4.mod/scribus/pageitem_textframe.cpp.mod	2014-12-08 22:56:23.540099486 +0900
@@ -822,6 +822,7 @@
 	unsigned int code = ch.unicode();
 	if (	(0x2E80 < code && code < 0x2EFF) ||   // CJK Radicals Supplement
 		(0x3000 < code && code < 0x303F) ||   // CJK Symbols and Punctuation
+		(0x3040 < code && code <= 0x30FF) ||  // Hiragana, Katakana
 		(0x31C0 < code && code < 0x31EF) ||   // CJK Strokes
 		(0x3200 < code && code < 0x32FF) ||   // Enclosed CJK Letters and Months
 		(0x3300 < code && code < 0x33FF) ||   // CJK Compatibility
@@ -846,7 +847,7 @@
 }
  
 static int checkCJKBreakAfter(QChar ch) {
-	unsigned int code[] = {0x201C, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F, 0xFF62, 0xFF0D, 0};
+	unsigned int code[] = {0x201C, 0x300C, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F, 0xFF62, 0xFF0D, 0};
 	for (int i = 0; code[i]; ++i)
 		if (code[i] == ch.unicode())
 			return 0;
@@ -855,7 +856,7 @@
 
 static int checkCJKBreakBefore(QChar ch) {
 	unsigned int code[] =
-	 {0x201D, 0x3002, 0xFF01, 0xFF09, 0xFF0C, 0xFF0E, 0xFF1A,
+	 {0x201D, 0x3001, 0x3002, 0x300D, 0xFF01, 0xFF09, 0xFF0C, 0xFF0E, 0xFF1A,
 	  0xFF1B, 0xFF1F, 0xFF3D, 0xFF5D, 0xFF60, 0xFF63, 0xFF64, 0};
 	for (int i = 0; code[i]; ++i)
 		if (code[i] == ch.unicode())

cbradney

2015-02-22 16:23

administrator   ~0034559

I've committed this for 1.5, however this patch doesn't seem to apply to 1.4.x

Kunda

2015-02-27 13:20

updater   ~0034624

hey ftake, can you test this on 1.5svn ?

ftake

2015-03-02 14:25

reporter   ~0034630

Tested with svn19879. It works fine to me.
https://build.opensuse.org/package/show/home:ftake:scribus:15/scribus

I will try further improvement when I have time.

Thanks.

Kunda

2015-03-02 15:07

updater   ~0034631

ftake, thanks so much for the contribution. Closing this issue for now. Please reopen when you have another patch. Also if you have any capability to contribute effort to other bugs that are open...please don't hesitate :)

Issue History

Date Modified Username Field Change
2015-02-22 14:04 ftake New Issue
2015-02-22 14:04 ftake File Added: japanese-breaking-and-alignment.patch
2015-02-22 16:23 cbradney Note Added: 0034559
2015-02-22 16:25 cbradney Status new => resolved
2015-02-22 16:25 cbradney Fixed in Version => 1.5.0svn
2015-02-22 16:25 cbradney Resolution open => fixed
2015-02-22 16:25 cbradney Assigned To => cbradney
2015-02-27 13:20 Kunda Note Added: 0034624
2015-03-02 14:25 ftake Note Added: 0034630
2015-03-02 15:07 Kunda Note Added: 0034631
2015-03-02 15:07 Kunda Status resolved => closed
2015-09-17 20:08 Kunda Category Story Editor / Text Frames => Story Ed/Txt Frames
2015-09-17 20:12 Kunda Category Story Ed/Txt Frames => Story Editor / Text Frames