Bug 169639 - Missing Hex Boxes from Missing Font Glyphs
Summary: Missing Hex Boxes from Missing Font Glyphs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: cairo
Version: rawhide
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Carl Worth (Ampere)
QA Contact:
URL:
Whiteboard:
: 166244 (view as bug list)
Depends On:
Blocks: FC5Blocker
TreeView+ depends on / blocked
 
Reported: 2005-09-30 15:11 UTC by Warren Togami
Modified: 2007-11-30 22:11 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-01-19 19:19:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Warren Togami 2005-09-30 15:11:32 UTC
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.

Comment 1 Matthias Clasen 2005-10-28 01:45:58 UTC
*** Bug 166244 has been marked as a duplicate of this bug. ***

Comment 3 Warren Togami 2005-11-29 19:36:24 UTC
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 (Ampere) 2005-11-30 17:06:38 UTC
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 17:23:28 UTC
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-12-01 03:36:40 UTC
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.


Comment 7 Liang Zhang 2005-12-01 03:47:18 UTC
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-12-01 04:53:33 UTC
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-16 03:02:06 UTC
The bug was fixed in the cvs of gnome upstream.
So it can be closed.

Comment 10 Leon Ho 2006-01-16 07:17:04 UTC
Can somebody in upstream confirm this fix is in FC5 package?

Comment 12 Matthias Clasen 2006-01-19 19:19:01 UTC
Fixed in recent pango 


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