Bug 169639 - Missing Hex Boxes from Missing Font Glyphs
Missing Hex Boxes from Missing Font Glyphs
Product: Fedora
Classification: Fedora
Component: cairo (Show other bugs)
All Linux
high Severity medium
: ---
: ---
Assigned To: Carl Worth
: Regression
: 166244 (view as bug list)
Depends On:
Blocks: FC5Blocker
  Show dependency treegraph
Reported: 2005-09-30 11:11 EDT by Warren Togami
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-19 14:19:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Warren Togami 2005-09-30 11:11:32 EDT
This report follows the upstream cairo bug where FC5 no longer displays hex
boxes when a font is missing a glyph.  The current behavior is to display
nothing, not even a blank space-holder.  This behavior is especially bad because
there is no visible or functional indication that something should be displayed
there.  This as Owen mentions in the above report can easily lead to accidental
document corruption and other problems.

There is some disagreement from some developers on this matter, but #eng-i18n
believes that we should have the same hex box behavior as previous releases
implemented in cairo before FC5 and RHEL5.
Comment 1 Matthias Clasen 2005-10-27 21:45:58 EDT
*** Bug 166244 has been marked as a duplicate of this bug. ***
Comment 3 Warren Togami 2005-11-29 14:36:24 EST
I talked with rstrode and mclasen today.  They suggested that the rendering
should be implemented into cairo's "Toy" API as a public function, and pango
should call that function when it has a missing glyph.  Maybe cworth may have
something to add to the implementation details.
Comment 4 Carl Worth 2005-11-30 12:06:38 EST
Yes, I would like to see cairo_show_text (cairo's "toy" API) improved in this
area. Currently, cairo_show_text displays renders glyphs from a single font and
does nothing for glyphs that are missing from that font.

I'd like to see this improved in two ways:

1) Add "hex box" drawing for missing glyphs.

2) Add support to find glyphs from other fonts if the current font is missing
it. When using fontconfig this is particularly easy to do well.

As for pango, it's not as obvious to me that it should ever call cairo's toy
API. But if it were to use cairo_show_text for missing glyphs, it would only
need (1) above to be implemented.
Comment 5 Behdad Esfahbod 2005-11-30 12:23:28 EST
There are a couple of ways to go:

1) Pango does it's own work, not depend on cairo.
2) Cairo has a way to show hexbox, that Pango uses.

pangoxft does this by replacing a nonexistant glyphs with something like
0x10000000|charcode, and then when rendering, render a hexbox if
glyph&0x10000000.  If cairo supports this directly, the better.

No matter which approach is taken, a good start is to just draw a box at least.
 I try to do that in Pango for now.
Comment 6 Liang Zhang 2005-11-30 22:36:40 EST
Though debuging, I find that the function of "get_unkonw_glyph()" of pango-1.6
calls pango_xft_font_real_get_unknow_glyph() in fact, and the function only
returns 0x10000000|charcode.
And I find that the function of "get_unkonw_glyph()" of pango-1.10 calls
pango_cairo_fc_font_real_get_unknown_glyph() in fact, and the function only
returns 0.
So I need modify "returns 0" to "0x10000000|charcode".
And I want to add the drawing hex-box in pango_cairo_renderer_draw_glyphs() of
I will test it.
Comment 7 Liang Zhang 2005-11-30 22:47:18 EST
pango_cairo_renderer_draw_glyphs() calls cairo_show_glyphs(), and
cairo_show_glyphs() calls _cairo_gstate_show_glyphs.
I can not find that cairo_show_text() is called in the process of rendering text.
Comment 8 Warren Togami 2005-11-30 23:53:33 EST
mclasen & rstrode's suggestion was to add a function to the cairo "toy" API and
pango use that directly.  cworth doesn't think this makes sense, but maybe he is
unaware that pango does not currently call cairo_show_text().  Maybe this
situation is a bit confusing to everyone.

The cairo (cworth) and pango (mclasen) maintainers, and upstream, should come to
some agreement about how exactly they want this to be implemented.
Comment 9 Liang Zhang 2006-01-15 22:02:06 EST
The bug was fixed in the cvs of gnome upstream.
So it can be closed.
Comment 10 Leon Ho 2006-01-16 02:17:04 EST
Can somebody in upstream confirm this fix is in FC5 package?
Comment 12 Matthias Clasen 2006-01-19 14:19:01 EST
Fixed in recent pango 

Note You need to log in before you can comment on or make changes to this bug.