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 85341 - Some characters are incorrectly displayed on Yelp.
Some characters are incorrectly displayed on Yelp.
Status: VERIFIED FIXED
Product: yelp
Classification: Applications
Component: General
1.0
Other Linux
: Normal major
: ---
Assigned To: Mikael Hallendal
Yelp maintainers
Depends on: 63633
Blocks:
 
 
Reported: 2002-06-15 04:05 UTC by Miles Lane
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Image showing text associated with "“Cardinal”" (2.18 KB, image/png)
2002-06-15 04:10 UTC, Miles Lane
  Details
Image showing the text associated with the xml "seed&#8230;</b> &#8212; " (2.49 KB, image/png)
2002-06-15 04:13 UTC, Miles Lane
  Details
patch to change entity definitions for problem glyphs (1.45 KB, patch)
2002-08-04 14:34 UTC, James Henstridge
none Details | Review

Description Miles Lane 2002-06-15 04:05:15 UTC
Some characters are getting incorrectly rendered in Yelp.
I don't know if it is an issue in yelp-db2html, gtkhtml2
or pango.

The XML source for these characters is:

<quote>
</quote>
&hellip;
&mdash;

yelp-db2html converts the characters into:

&#8220;
&#8221;
&#8230;
&#8212;

Apparantly, these are given to gtkhtml2,
which then sends information on to Pango
for final rendering.

I will attach an image showing the characters as rendered
in Yelp.
Comment 1 Miles Lane 2002-06-15 04:10:36 UTC
Created attachment 9237 [details]
Image showing text associated with "&#8220;Cardinal&#8221;"
Comment 2 Miles Lane 2002-06-15 04:13:24 UTC
Created attachment 9238 [details]
Image showing the text associated with the xml "seed&#8230;</b> &#8212; "
Comment 3 Miles Lane 2002-06-15 05:21:26 UTC
I should note, I don't know what specifies what font is shown in the
Yelp window.  The index display text seems to be controlled by the
"Standard application font" in the Font Preferences dialog.  However,
the font selections in the Font Preferences dialog don't change the
font in Yelp's content pane.
Comment 4 Owen Taylor 2002-06-15 13:59:59 UTC
I guess this is more or less related to bug 63633 ... your font
simply doesn't have those glyphs, but perhaps Pango could
approximate them using standard ASCII. (What sort of font
doens't have real quotes??? Maybe your font is just misencoded.)

[ I assume you realize hat the "misrendering" is a box
  unicode codepoint in it ]
Comment 5 Miles Lane 2002-06-17 02:12:56 UTC
If someone could inform me how to determine which font is being
displayed in the content pane of Yelp, I can take a look at the font
and see what characters are there.  Also, any other tips on checking
the encoding would be appreciated.

I'm not sure what you mean by "box unicode codepoint."
Comment 6 James Henstridge 2002-06-17 06:19:16 UTC
As I understand this problem, it only occurs if you are using a font
without the extra glyphs found in Microsoft fonts (curly quotes, em
dashes, etc). 

While it would be good to get pango to use substitutes when glyphs for
ellipses, etc aren't available, it should be possible to work around
this bug in Yelp, so I am assigning it there.

By changing the entity declarations in
yelp/stylesheets/docbook/dtd/ent/iso-pub.ent, so that things like
&hellip; get replaced with "..." rather than "&#x2026;".  The curly
quotes might not look as nice when using `` and '' with some fonts,
but it is probably a worthwhile tradeoff (assuming that a fair number
of users don't install Microsoft fonts on their systems).
Comment 7 James Henstridge 2002-06-17 06:34:02 UTC
An extra note:

These glyphs are not Microsoft extensions or anything.  They are
listed on http://www.unicode.org/charts/PDF/U2000.pdf, but the Latin1
fonts that come with X don't include the glyphs, while most of the
Microsoft ones do.
Comment 8 Mikael Hallendal 2002-06-17 20:20:18 UTC
James, are you suggesting that this should be handled in the stylesheets?

How will this show for users with fonts capable of displaying the glyphs?
Comment 9 James Henstridge 2002-06-18 00:59:58 UTC
I was actually suggesting a change in the DTD, so that those entites
expanded to codepoints that the standard fonts that come with X
support (in the PDF I linked to above, they have recommended
substitutions).

For people using fonts that support these glyphs, the change would
have a slight negative impact -- no curly quotes, and em dashes
wouldn't look as good.  I doubt they would notice the difference for
the ellipsis.

As Owen pointed out, this should eventually get fixed upstream so that
Pango does the appropriate glyph substitutions.  My proposed fix is a
temporary solution that works around the problem.
Comment 10 Owen Taylor 2002-06-18 01:13:04 UTC
It should be noted that at the current versions of these fonts
(now called "Luxi") _do_ have characters.
Comment 11 Mikael Hallendal 2002-06-18 09:58:39 UTC
James, could you provide a patch with the changes needed?

Louie, could this be marked 2.0.1?
Comment 12 Luis Villa 2002-06-21 01:58:08 UTC
Yes.
Comment 13 Mikael Hallendal 2002-06-27 21:57:42 UTC
James, do you know what should be changed to fix this?
Comment 14 James Henstridge 2002-07-02 07:40:13 UTC
We have to make a trade off here.  If we leave things like they are,
people who use the Luxi fonts or the MS ones will have nice looking
quotes, em dashes, ellipses, etc.  People using just Latin1 fonts will
see the "no glyph" box in place of those glyphs.  This will go on
until Pango can do the required glyph substitutions itself.

The alternative is to modify the entity definitions in the DocBook
DTDs so that we expand those entities to characters that are more
likely to have the associated glyph in the chosen font.

At first, I didn't realise that any of the fonts distributed with
XFree86 included these glyphs, it seemed like a fairly good idea. 
However, since the Luxi fonts have the glyphs, maybe we should tell
people to use them?

If we do hack the DTD, we would want to undo the hacks when Pango can
perform the glyph substitution.

It may be easier to wait and see who else complains about this...
Comment 15 Miles Lane 2002-07-02 07:48:48 UTC
It's kind of a drag that RedHat doesn't ship XFree86 4.2.0 
rpms for RH 7.2 / RH 6.2, yet.  It makes upgrading for many
people non-trivial.  :-(  I'd feel better about telling
people to upgrade if they could do it without compiling
XFree86.
Comment 16 James Henstridge 2002-08-04 14:34:12 UTC
Created attachment 10244 [details] [review]
patch to change entity definitions for problem glyphs
Comment 17 James Henstridge 2002-08-04 14:35:17 UTC
Miles: does the above patch help with your problem?
Comment 18 Mikael Hallendal 2002-08-04 14:39:31 UTC
Commiting to gnome-2-0 branch. Marking as fixed (Miles, can you verify
or reopen).

Will open a new bug for the HEAD branch which will depend on the pango
bug.

Thanks a lot!
Comment 19 Mikael Hallendal 2002-08-04 14:42:07 UTC
Hmm.. reopening this one and marks it as depending on the other bug
instead. Miles, please verify anyway.

Louie, if verified by Miles we can remove the 2.0.1 keyword, right? Or
should a new bug be created?
Comment 20 Luis Villa 2002-08-06 21:25:06 UTC
Sounds good. I'm assuming miles will verify :) 
Comment 21 Miles Lane 2002-08-08 09:20:25 UTC
It appears to be fixed.  I installed the 4.1.0 fonts and the glyphs
looked fine.  It is rather hard for me to know for sure, since 
I am now running XFree86 cvs HEAD with these fonts, rather than
the XFree86 4.1 server.  Also, I have pango and all that set up
to work with XFree86 HEAD, so I am not really comparing apples
with apples.  

Does someone want to mark this Fixed?
Comment 22 Mikael Hallendal 2002-08-20 20:13:45 UTC
marking as fixed.