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 410169 - gravity problem with Common chars
gravity problem with Common chars
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2007-02-20 21:10 UTC by Vincent Untz
Modified: 2009-07-22 20:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Good (9.37 KB, image/png)
2007-02-20 21:11 UTC, Vincent Untz
Details
bad (7.99 KB, image/png)
2007-02-20 21:11 UTC, Vincent Untz
Details

Description Vincent Untz 2007-02-20 21:10:40 UTC
See the screenshots.
Comment 1 Vincent Untz 2007-02-20 21:11:40 UTC
Created attachment 82995 [details]
Good
Comment 2 Vincent Untz 2007-02-20 21:11:58 UTC
Created attachment 82996 [details]
bad
Comment 3 Behdad Esfahbod 2007-02-20 21:21:18 UTC
The problem is that Common chars are marked Japanese by pango_itemize() and so take the gravity of the Japanese text.  Fantasai also warned us that digits should not go like this.  So we need a way to fix this mess now.  Using markup to set gravity on them is one fix for now, but that doesn't scale.


vuntz: the worst issue is when you show the date, since it will be something like "japanese 12 japanese 22:00"
vuntz: japanese should be vertical
vuntz: 12 horizontal
vuntz: and 22:00 rotated :-)

I forgot what that style is called.  It's kinda hard to do with pango's current architecture.  Though it should be possible to get an approximation by treating the two digits like a ligature...
Comment 4 Behdad Esfahbod 2007-05-24 20:32:02 UTC
Related bug 441033.
Comment 5 Behdad Esfahbod 2009-07-22 18:00:45 UTC
Also see bug 589113.
Seems like U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK also needs some more work to get right.
Comment 6 Behdad Esfahbod 2009-07-22 20:27:22 UTC
commit ac2ce962e9c257657eeceaf08d6aeeddd6faaa83
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Wed Jul 22 16:24:43 2009 -0400

    Bug 410169 – gravity problem with Common chars
    
    Only show wide chars (as in g_unichar_iswide()) upright.
    This improves rendering of 1) digits in CJK context, and 2) Narrow
    Hangul characters.
    
    New public API:
    
        pango_gravity_get_for_script_and_width()