View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012928 | Scribus | Story Editor / Text Frames | public | 2015-02-22 14:04 | 2015-03-02 15:07 |
Reporter | ftake | Assigned To | cbradney | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | openSUSE | OS Version | 13.2 |
Product Version | 1.5.0svn | ||||
Fixed in Version | 1.5.0svn | ||||
Summary | 0012928: Insufficient justification of Japanese text | ||||
Description | Due 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 Information | I 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. | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
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()) |
|
I've committed this for 1.5, however this patch doesn't seem to apply to 1.4.x |
|
hey ftake, can you test this on 1.5svn ? |
|
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. |
|
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 :) |
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 |