http://bugzilla.gnome.org/show_bug.cgi?id=313551 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.
*** Bug 166244 has been marked as a duplicate of this bug. ***
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.
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.
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.
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 pango-1.10. I will test it.
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.
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.
The bug was fixed in the cvs of gnome upstream. So it can be closed.
Can somebody in upstream confirm this fix is in FC5 package?
Fixed in recent pango