View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011613 | Scribus | General | public | 2013-06-20 12:13 | 2016-11-16 08:48 |
Reporter | JLuc | Assigned To | cbradney | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Product Version | 1.5.0svn | ||||
Summary | 0011613: [PATCH] vertical position of line depending on text (same content, different layout) | ||||
Description | 2 frames with one-liner content : with same text styles, both texts having the same accenctuated uppercase letter in one frame, accent is IN frame in other frame, accent is OUT and line is not aligned with first one | ||||
Tags | layout | ||||
Patch | Yes | ||||
|
|
|
|
|
As for font : use for example "Liberation Serif" or "Liberation Sans" so as to reproduce. AMOF, the outside-of-frame accent comes from a lowercase é letter that has the "K" to-uppercase character effect. I tried using the "hampe" (french) parameter of the "first line effect" of the PP but with no visible effect afaict. IMO, scribus layout should be the same with uppercase é or with É. |
|
Confirmed, fixed, patched. |
|
Patch uploaded |
|
it looks like the patch is not uploaded cezaryece... |
|
11613.patch (2,067 bytes)
diff --git a/Scribus/scribus/pageitem_textframe.cpp b/Scribus/scribus/pageitem_textframe.cpp index 0b96a3c..9f51478 100644 --- a/Scribus/scribus/pageitem_textframe.cpp +++ b/Scribus/scribus/pageitem_textframe.cpp @@ -1612,9 +1612,9 @@ void PageItem_TextFrame::layout() opticalMargins = style.opticalMargins(); CharStyle charStyle = ((hl->ch != SpecialChars::PARSEP) ? itemText.charStyle(a) : style.charStyle()); chstr = ExpandToken(a); - int chstrLen = chstr.length(); if (chstr.isEmpty()) chstr = SpecialChars::ZWNBSPACE; + int chstrLen = chstr.length(); curStat = SpecialChars::getCJKAttr(hl->ch); @@ -1650,6 +1650,32 @@ void PageItem_TextFrame::layout() style.setLineSpacing (calculateLineSpacing (style, this)); FlopBaseline = (current.startOfCol && firstLineOffset() == FLOPBaselineGrid); + //change characters and/or scaling/offset due to typographic effects + int chst = charStyle.effects() & 1919; + if (chst != ScStyle_Default) + { + if (chst & ScStyle_Superscript) + { + offset += charStyle.fontSize() * m_Doc->typographicPrefs().valueSuperScript / 100.0; + scaleV *= qMax(m_Doc->typographicPrefs().scalingSuperScript / 100.0, 10.0 / charStyle.fontSize()); + scaleH *= qMax(m_Doc->typographicPrefs().scalingSuperScript / 100.0, 10.0 / charStyle.fontSize()); + } + else if (chst & ScStyle_Subscript) + { + offset -= charStyle.fontSize() * m_Doc->typographicPrefs().valueSubScript / 100.0; + scaleV *= qMax(m_Doc->typographicPrefs().scalingSubScript / 100.0, 10.0 / charStyle.fontSize()); + scaleH *= qMax(m_Doc->typographicPrefs().scalingSubScript / 100.0, 10.0 / charStyle.fontSize()); + } + if ((chst & ScStyle_AllCaps) || (chst & ScStyle_SmallCaps)) + chstr = chstr.toUpper(); + if (chst & ScStyle_SmallCaps) + { + double smallcapsScale = m_Doc->typographicPrefs().valueSmallCaps / 100.0; + scaleV *=smallcapsScale; + scaleH *= smallcapsScale; + } + } + // find out about par gap and dropcap if (a == firstInFrame()) { |
|
Sorry, forgot click Upload button |
|
Could somebody care for this patch ? |
|
Cezary : i tested the patch and it's not OK. AMOF with your patch each lines appears on same height, but it introduces a big issue : space on top of line becomes very very high and text doesnt fit anymore in textframe and textframe has to be made much higher so the text fits in it. This needs to be fixed. I had to update the file references in the patch so as to apply it so i upload the new version. |
|
issue11613 updated 2015 11 24.patch (2,035 bytes)
diff --git a/scribus/pageitem_textframe.cpp b/scribus/pageitem_textframe.cpp index 0b96a3c..9f51478 100644 --- a/scribus/pageitem_textframe.cpp +++ b/scribus/pageitem_textframe.cpp @@ -1612,9 +1612,9 @@ void PageItem_TextFrame::layout() opticalMargins = style.opticalMargins(); CharStyle charStyle = ((hl->ch != SpecialChars::PARSEP) ? itemText.charStyle(a) : style.charStyle()); chstr = ExpandToken(a); - int chstrLen = chstr.length(); if (chstr.isEmpty()) chstr = SpecialChars::ZWNBSPACE; + int chstrLen = chstr.length(); curStat = SpecialChars::getCJKAttr(hl->ch); @@ -1650,6 +1650,32 @@ void PageItem_TextFrame::layout() style.setLineSpacing (calculateLineSpacing (style, this)); FlopBaseline = (current.startOfCol && firstLineOffset() == FLOPBaselineGrid); + //change characters and/or scaling/offset due to typographic effects + int chst = charStyle.effects() & 1919; + if (chst != ScStyle_Default) + { + if (chst & ScStyle_Superscript) + { + offset += charStyle.fontSize() * m_Doc->typographicPrefs().valueSuperScript / 100.0; + scaleV *= qMax(m_Doc->typographicPrefs().scalingSuperScript / 100.0, 10.0 / charStyle.fontSize()); + scaleH *= qMax(m_Doc->typographicPrefs().scalingSuperScript / 100.0, 10.0 / charStyle.fontSize()); + } + else if (chst & ScStyle_Subscript) + { + offset -= charStyle.fontSize() * m_Doc->typographicPrefs().valueSubScript / 100.0; + scaleV *= qMax(m_Doc->typographicPrefs().scalingSubScript / 100.0, 10.0 / charStyle.fontSize()); + scaleH *= qMax(m_Doc->typographicPrefs().scalingSubScript / 100.0, 10.0 / charStyle.fontSize()); + } + if ((chst & ScStyle_AllCaps) || (chst & ScStyle_SmallCaps)) + chstr = chstr.toUpper(); + if (chst & ScStyle_SmallCaps) + { + double smallcapsScale = m_Doc->typographicPrefs().valueSmallCaps / 100.0; + scaleV *=smallcapsScale; + scaleH *= smallcapsScale; + } + } + // find out about par gap and dropcap if (a == firstInFrame()) { |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-06-20 12:13 | JLuc | New Issue | |
2013-06-20 12:13 | JLuc | File Added: accent depasse.sla | |
2013-06-20 12:13 | JLuc | File Deleted: accent depasse.sla | |
2013-06-20 12:14 | JLuc | File Added: accent depasse.sla | |
2013-06-20 12:14 | JLuc | File Added: Screenshot test2013-06-20 14:12:14.jpg | |
2013-06-20 12:19 | JLuc | Note Added: 0030305 | |
2013-06-20 12:26 | JLuc | Note Edited: 0030305 | |
2013-06-20 19:03 | JLuc | Note Edited: 0030305 | |
2013-06-20 19:03 | JLuc | Note Edited: 0030305 | |
2013-06-20 21:54 | christoph_s | Assigned To | => cezaryece |
2013-06-20 21:54 | christoph_s | Status | new => assigned |
2013-10-01 08:18 | cezaryece | Note Added: 0030647 | |
2013-10-01 08:19 | cezaryece | Assigned To | cezaryece => cbradney |
2013-10-01 08:19 | cezaryece | Note Added: 0030648 | |
2013-10-01 08:19 | cezaryece | Status | assigned => confirmed |
2013-10-01 14:06 | JLuc | Note Added: 0030650 | |
2013-10-01 14:07 | JLuc | Note Edited: 0030650 | |
2013-10-01 17:39 | cbradney | Assigned To | cbradney => cezaryece |
2013-10-01 17:39 | cbradney | Status | confirmed => assigned |
2013-10-02 07:01 | cezaryece | File Added: 11613.patch | |
2013-10-02 07:02 | cezaryece | Note Added: 0030654 | |
2013-10-02 07:02 | cezaryece | Assigned To | cezaryece => cbradney |
2013-10-02 07:02 | cezaryece | Status | assigned => confirmed |
2013-12-23 10:36 | JLuc | Note Added: 0030944 | |
2014-04-07 15:06 | JLuc | Tag Attached: layout | |
2014-07-13 01:52 | Kunda | Summary | Same content, different layout => [PATCH] Same content, different layout |
2014-10-04 16:21 | JLuc | Status | confirmed => feedback |
2014-10-24 22:57 | Kunda | Patch | => Yes |
2015-11-24 09:10 | JLuc | Summary | [PATCH] Same content, different layout => [PATCH] vertical position of line depending on text (same content, different layout) |
2015-11-24 09:13 | JLuc | Relationship added | related to 0012154 |
2015-11-24 13:36 | JLuc | Note Added: 0037646 | |
2015-11-24 13:36 | JLuc | Status | feedback => assigned |
2015-11-24 13:36 | JLuc | File Added: issue11613 updated 2015 11 24.patch | |
2015-11-24 13:48 | JLuc | Status | assigned => new |
2015-11-24 13:48 | JLuc | Note Edited: 0037646 | |
2016-11-16 08:43 | JLuc | Tag Attached: #rottenpatch | |
2016-11-16 08:43 | JLuc | Tag Attached: rot | |
2016-11-16 08:43 | JLuc | Tag Detached: rot | |
2016-11-16 08:47 | JLuc | Tag Detached: #rottenpatch | |
2016-11-16 08:48 | JLuc | Relationship added | related to 0009365 |