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 112503 - pango should use the same font for entire script run
pango should use the same font for entire script run
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.2.x
Other other
: Normal normal
: future
Assigned To: pango-maint
pango-maint
Depends on: 91542
Blocks:
 
 
Reported: 2003-05-07 16:55 UTC by Dov Grobgeld
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dov Grobgeld 2003-05-07 16:55:25 UTC
Right now if a run of non-basic characters are input, e.g. by inserting

          ABC DEF

where ABC and DEF e.g. indicate Hebrew characters, the words ABC and DEF
are separately rendered in a Hebrew font and the space between the words is
rendered in an "Latin" font. Very often the space of the "Latin" font has a
height that is larger than the space of the Hebrew font. As a result the
height of the line changes once the space is typed.

The solution is to render spaces according to the font of surrounding
characters. If the two sides have different fonts, it would make sense to
use the largest font height of the two fonts.
Comment 1 Owen Taylor 2003-05-07 17:02:43 UTC
What I was thinking was right is that after we determine the 
script for each character as in bug 91542, we try to find a font
that covers the _entire_ script run instead of finding
the font individually for each character. Only when we
can't find a font that satisfies the entire run, do we
switch to a different font.

Though actually, this isn't quite right since you never
want to use something other than the default font for for the
script range for the whole range.
Comment 2 Owen Taylor 2003-09-24 00:02:39 UTC
What I ended up doing was picking fonts for rendering characters
individually, then picking fonts for non-rendering characters
based on the adjacent rendering characters. This is to deal
with things like ZWJ/ZWNJ which might not even be in the fonts.

The changes I checked in also help in this regard because
they correct language tags based on script information ...
if you have "ABC DEF" and the language tag is "en" but
the script is HEBREW, then Pango corrects the language
tag to "he" for the entire run.