After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 580275 - Display hyphen when line breaks at soft hyphen
Display hyphen when line breaks at soft hyphen
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
1.35.x
Other All
: Normal enhancement
: ---
Assigned To: pango-maint
pango-maint
: 648718 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-04-26 11:03 UTC by Tim Fisken
Modified: 2018-05-22 12:50 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Tim Fisken 2009-04-26 11:03:17 UTC
Currently, PangoLayout breaks lines at U+00AD SOFT HYPHEN, treating it as an invisible line-break point. That character is usually understood to mean a point where a hyphen should be inserted if the line is broken at that point. It would improve pango's text rendering if it was able to insert hyphens when lines were broken at a soft hyphen.
Comment 1 Seán de Búrca 2013-09-11 06:25:00 UTC
I have been working to solve this bug. My current approach is to hyphenate all intraword breaks. I believe that I have most of the logic for this in place, but am currently unsure where it would be best to actually insert the hyphen text into the layout.

From discussions with Owen Taylor on IRC, he was unsure whether it would be best to insert the hyphen into an existing run and risk some font weirdness if the font being used doesn't include a glyph for the hyphen character, or to create a new run, which would have no actual text associated with it. Feedback on this would be appreciated.

I am also thinking that it may be necessary to be able to specify that a particular PangoLayout should not hyphenate any text. For example, gedit or anjuta text views hyphenating text could confuse developers. I am not sure how best to handle this problem.
Comment 2 Behdad Esfahbod 2013-09-17 00:20:50 UTC
(In reply to comment #1)
> 
> From discussions with Owen Taylor on IRC, he was unsure whether it would be
> best to insert the hyphen into an existing run and risk some font weirdness if
> the font being used doesn't include a glyph for the hyphen character, or to
> create a new run, which would have no actual text associated with it. Feedback
> on this would be appreciated.

Check ellipsize.c.  The logic would be very similar IMO.


> I am also thinking that it may be necessary to be able to specify that a
> particular PangoLayout should not hyphenate any text. For example, gedit or
> anjuta text views hyphenating text could confuse developers. I am not sure how
> best to handle this problem.

Correct.  Perhaps a pango_layout_[sg]et_hyphenate().
Comment 3 Alexandre Franke 2017-06-29 20:11:08 UTC
*** Bug 648718 has been marked as a duplicate of this bug. ***
Comment 4 GNOME Infrastructure Team 2018-05-22 12:50:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/155.