Mantis Issue Tracking for Scribus
· Hosting provided by / Øverby Consulting ·

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012565ScribusTypographypublic2014-07-28 16:222015-11-24 11:40
Assigned To 
PlatformIntelOSWindowsOS Version7 (NL)
Product Version1.4.4 
Target Version1.5.1Fixed in Version 
Summary0012565: Right alignment of hyphens
DescriptionWhen text is aligned to the right side of the textframe and hyphenation is switched on, a soft hyphen is not placed against the right side of the textframe.

If the soft hyphen is replaced by a hard hyphen and follow by a line break, the result is as might be expected.

When Optical Margins are applied to the right, the hyphen is placed as it should be.

(See the attached .odt file for screendumps.)
Steps To ReproduceObvious
TagsHOST-Oman, layout
Attached Files? file icon Alignment bug Scribus 1.4.4. - 18-7-2014.odt [^] (108,068 bytes) 2014-07-28 16:22
diff file icon updated_Shyphen.diff [^] (823 bytes) 2015-11-17 09:15 [Show Content]

- Relationships
related to 0012346new (right-align) same bug as 0010720 but concerning more platforms and more versions 
related to 0010720confirmed Right-aligned text does not work as expected with some fonts. 
related to 0011071confirmed buggy behaviour with align-right tabs 

-  Notes
Kunda (manager)
2014-07-28 18:44

I think this is a duplicate, right?
JLuc (developer)
2014-07-28 23:44

With the #layout tag we also got 0010720 : "Right-aligned text does not work as expected with some fonts." 0010720 is not about hyphens, but i mention the hyphen phenomenon in one of its comments.
I suggest we keep both open since they seems different however related.
ibrahim (reporter)
2015-11-01 10:28

I tried to modify the hyphenation so that can work with optical frame option. please chick the attachment.
ale (manager)
2015-11-06 14:23
edited on: 2015-11-06 14:25

ibrahim, i cannot say if this patch does what you think it does.

but by reading it, i cannot be confident that you understood what you are doing: from a logical (mathematical logic!) point of view it does not really make sense to first check for a value being different than something *and* then being equal to something else.

can you please explain why you think your patch solves this issue and provide a patch that is also "logically" correct?

ibrahim (reporter)
2015-11-10 12:10

Perhaps I understand it wrongly. please correct me if I am wrong.
the solution of this issue is to

1)remove the small space between the soft hyphen and the right side of the text frame.
2)making sure that the behaviour of the soft hyphen be like the hard hyphen after adding optical margin.
JLuc (developer)
2015-11-10 15:32

In the patch,
if (currentCh != '-' && currentCh == SpecialChars::SHYPHEN)"

is quite silly code.

Please fix that first.
ibrahim (reporter)
2015-11-12 10:19

I fixed it and attach it again. Can you review it again..
ibrahim (reporter)
2015-11-17 09:30

The Idea of this patch is that Scribus when it run and reach this following line:

glyphs->more->xadvance = font.charWidth('-', itemText.charStyle(a).fontSize() / 10.0) * scaleH;

The function charWidth receives the width of hyphen (font size) and but it is more space at the end of the line.

So, I removed the hyphen width and replace it with 0 then I end with a good results
JLuc (developer)
2015-11-17 10:08
edited on: 2015-11-17 10:12

2 questions and 1 advice :

1) I'm not sure : isn't font.charWidth('-',0) allways equal to 0 ?
That would make your code simpler.

2) in the changed line, there is an explicit comment advising to "test with large glyphs horizontal scaling eg. 20%".
Have you done so and did you try your patch, as advised, with "large glyphs horizontal scaling eg. 20%" ?
This horizontal scaling is to be set in the property palette text subtab.

3) in case your patch really fix the issue, the comment should be deleted since the code isnt to be fixed anymore. Isnt ?

JLuc (developer)
2015-11-23 12:48

Any answers Ibrahim ?
ibrahim (reporter)
2015-11-24 06:49

Sorry for delay

1) Yes I checked It today and I found that it always 0.\
2) I did not understand what he mean by "test with large glyphs horizontal scaling eg. 20%"
JLuc (developer)
2015-11-24 11:02
edited on: 2015-11-24 11:04

1) Then your patch can be made more simple

2) Horizontal scaling of glyphs is a setting in the "Advanced" subpane of the "Text" pane of the property palette (F2). It can also be set in the character style definition (F3). A large horizontal scaling will have big effects on horizontal computations since glyphs take more rooms than with a normal scaling. Can you test your patch with a text that has such a big horizontal scaling, and say your patch also fixes the right alignment of hyphens in such a case ?

ibrahim (reporter)
2015-11-24 11:40

Ok I understand now,

I tested and it is fine.

- Issue History
Date Modified Username Field Change
2014-07-28 16:22 Gerrit_B New Issue
2014-07-28 16:22 Gerrit_B File Added: Alignment bug Scribus 1.4.4. - 18-7-2014.odt
2014-07-28 18:44 Kunda Note Added: 0033056
2014-07-28 23:37 JLuc Tag Attached: layout
2014-07-28 23:44 JLuc Note Added: 0033063
2014-07-29 15:52 Kunda Relationship added related to 0012346
2014-07-29 15:52 Kunda Relationship added related to 0010720
2014-07-29 15:53 Kunda Status new => confirmed
2014-07-29 15:53 Kunda Target Version => 1.5.1
2014-10-04 18:13 JLuc Relationship added related to 0011071
2015-11-01 08:35 ibrahim Tag Attached: HOST-Oman
2015-11-01 10:27 ibrahim File Added: updated_hyphen.diff
2015-11-01 10:28 ibrahim Note Added: 0037142
2015-11-01 16:27 JLuc Patch => Yes
2015-11-05 13:29 Kunda Sticky Issue No => Yes
2015-11-06 14:23 ale Note Added: 0037281
2015-11-06 14:25 ale Note Edited: 0037281 View Revisions
2015-11-06 14:25 ale Note Edited: 0037281 View Revisions
2015-11-10 12:10 ibrahim Note Added: 0037379
2015-11-10 15:32 JLuc Note Added: 0037383
2015-11-11 09:35 ibrahim File Deleted: updated_hyphen.diff
2015-11-12 09:07 ibrahim File Added: updated_Shyphen.diff
2015-11-12 10:19 ibrahim Note Added: 0037446
2015-11-14 15:33 ibrahim Note Added: 0037485
2015-11-17 08:16 ibrahim Note Deleted: 0037485
2015-11-17 09:15 ibrahim File Deleted: updated_Shyphen.diff
2015-11-17 09:15 ibrahim File Added: updated_Shyphen.diff
2015-11-17 09:30 ibrahim Note Added: 0037527
2015-11-17 10:08 JLuc Note Added: 0037528
2015-11-17 10:12 JLuc Note Edited: 0037528 View Revisions
2015-11-23 12:48 JLuc Note Added: 0037602
2015-11-24 06:49 ibrahim Note Added: 0037631
2015-11-24 11:02 JLuc Note Added: 0037639
2015-11-24 11:04 JLuc Note Edited: 0037639 View Revisions
2015-11-24 11:04 JLuc Note Edited: 0037639 View Revisions
2015-11-24 11:40 ibrahim Note Added: 0037640

Copyright © 2000 - 2015 MantisBT Team
Powered by Mantis Bugtracker