View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014087 | Scribus | Fonts | public | 2016-05-21 17:47 | 2017-05-23 21:06 |
Reporter | Space Pootler | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Platform | Linux | OS | Ubuntu | OS Version | 16.04 |
Product Version | 1.4.6 | ||||
Target Version | 1.5.4 | ||||
Summary | 0014087: Gentium Book Basic drop-cap 'J' renders to the left of its paragraph cut-out | ||||
Description | When using Gentium Book Basic in a style with a drop cap, beginning the paragraph with a word starting with 'J' results in some odd spacing. It appears that the 'J' is placed ignoring the descender (for in this font, capital J descends down to at least the level of an underline), causing the bottom left of the J to poke out of the text box. The metrics used to make the cut-out from the top left corner of the paragraph, however, appear to keep the full width of the glyph, suggesting that the rest of the drop-cap paragraph code expects the J to be placed slightly to the right of where it is. I'm not sure which is correct, but I'm fairly certain one of these things is wrong. It doesn't look right, especially when compared to drop-cap words beginning with 'I'. | ||||
Steps To Reproduce | Select a paragraph style that has a 2-row drop cap and a character style that uses Gentium Book Regular. Type out the full NATO phonetic alphabet, one word per line. Note that the J in "Juliett" appears shifted too far to the left, especially compared to "India" on the line above. | ||||
Additional Information | It's possible that this is a bug in the font metrics for my version of gentium (1.1), but I wouldn't begin to know how to check that. I've only noticed this with the drop-cap paragraphs, but I may not know what to look for elsewhere. | ||||
Tags | dropcap, scribusctl | ||||
Patch | No | ||||
|
|
|
off-topic: What about something like this attached dropcap SLA for a dropcap test document ? |
|
14087_gentium_book_dropcap.patch (1,134 bytes)
Index: scribus/pageitem_textframe.cpp =================================================================== --- scribus/pageitem_textframe.cpp (revision 21349) +++ scribus/pageitem_textframe.cpp (working copy) @@ -1815,9 +1815,8 @@ realCharHeight = qMax(realCharHeight, gm.ascent + gm.descent); gm = font.glyphBBox(gl.glyph, chsd / 10.0); realAsce = qMax(realAsce, gm.ascent + gm.descent); - wide += gm.width; + wide += font.glyphWidth(gl.glyph, charStyle.fontSize() / 10.0); } - wide = (wide * scaleH) + (1 - scaleH); realAsce = realAsce * scaleV + offset; if (realCharHeight == 0) realCharHeight = font.height(style.charStyle().fontSize() / 10.0); @@ -1827,6 +1826,7 @@ firstGlyph.scaleV = (realAsce / realCharHeight); firstGlyph.scaleH *= firstGlyph.scaleV; firstGlyph.xoffset -= 0.5; //drop caps are always to far from column left edge + wide *= firstGlyph.scaleH; } // This is to mimic pre-boxes branches in case first character of paragraph is a space // If we don't do this, paragraph offset will not apply correctly to first line |
|
I've uploaded a test patch which happens to fix the 'J' advance issue. No idea if it breaks stuff in other cases tho. |
|
Khaled, do you mind weighing in to see if this impacts CTL branch ? |
|
I’d rather weight until CTL branch is fixed before doing such fixed, some of this stuff is already fixed, some is not. But it makes my life harder to keep the branch in sync with trunk. |
|
@jgahli & @fahad ping |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-05-21 17:47 | Space Pootler | New Issue | |
2016-05-21 17:47 | Space Pootler | File Added: Document-1.sla | |
2016-05-22 19:06 | Kunda | Assigned To | => jghali |
2016-05-22 19:06 | Kunda | Status | new => confirmed |
2016-05-23 10:23 | Kunda | Note Added: 0041330 | |
2016-05-24 16:56 | Kunda | Tag Attached: dropcap | |
2016-05-24 18:29 | jghali | Assigned To | jghali => |
2016-05-24 21:00 | jghali | File Added: 14087_gentium_book_dropcap.patch | |
2016-05-24 21:03 | jghali | Note Added: 0041385 | |
2016-05-24 21:49 | Kunda | Note Added: 0041401 | |
2016-05-24 21:54 |
|
Note Added: 0041402 | |
2016-12-09 11:44 | Kunda | Tag Attached: scribusctl | |
2016-12-09 11:46 | Kunda | Target Version | => 1.5.3 |
2016-12-09 11:46 | Kunda | Note Added: 0042814 | |
2017-05-23 21:06 | cbradney | Target Version | 1.5.3 => 1.5.4 |