[cairo] show_glyphs function of FT backend

Peter Weilbacher mozilla at weilbacher.org
Sun May 13 13:21:50 EEST 2007

On 22Apr2007 at 08:56, Behdad Esfahbod wrote:
> On Sat, 2007-04-21 at 14:11 -0400, Peter Weilbacher (Mozilla) wrote:
>> Peter Weilbacher (Mozilla) wrote:
>>> I recently noticed[1] that the show_glyphs function was removed
>>> from the FT backend some time ago. I guess if there were postings
>>> to this list about it, I missed them and I am not experienced
>>> enough with git to find out why it was removed. Can somebody
>>> give me a hint?
>> Or do
>> we need to implement cairo-os2-font.c that then uses most of the FT
>> backend code and additionally implements show_glyphs?
> No, you shouldn't have to implement that function.  As you noted, there
> is fallback code in cairo-scaled-font.c that handles show_glyphs for
> backends that don't support it.

OK, it took me quite a while to figure out what was going wrong. It turns
out that the glyph positions were initialized in a wrong way, and hence
they never showed up within the surface...

Do I see correctly that there is no test in the cairo testsuite that
actually performs a test of the show_glyphs function? There's
show-glyphs-many but that paints white on white... So I made a quick hack,
adapting the show-glyphs-many test so that I have something to look at.
It's probably not very useful within the testsuite, especially as I have
no clue how to produce a reference image, but I attach it here anyway...
Maybe something similar could be added by someone who actually knows how
to write tests...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: show-glyphs-afew.c
Type: text/x-csrc
Size: 2858 bytes
Desc: not available
Url : http://cairographics.org/archives/cairo/attachments/20070513/ea3041b1/attachment.c 

More information about the cairo mailing list