[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help using pangofc afm decoder on the canvas?

From: Jan Nieuwenhuizen
Subject: help using pangofc afm decoder on the canvas?
Date: Tue, 15 Jun 2004 20:49:29 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

I've taken a first attempt to make and afm decoder for pango, and hook
it into the pango_fc_font_map.  See attached.  It's still mostly
empty; I'm having trouble to get a proof of concept going.

Here's the snippet where I hook the decoder

    PangoFontMap *map = pango_ft2_font_map_for_display ();
    PangoFcFontMap *fc_map = PANGO_FC_FONT_MAP (map);

    pango_fc_font_map_add_decoder_find_func (fc_map,
                                             0, 0);

and the decoder gets of course simply added to the findfuncs list.
But when lateron, I blondly say

    gnome_canvas_item_new (root, text_item, "x", 10.0, "y", 142.0,
                          "font", "LilyPond-feta, 32", "text", g_clef_utf8,
                          "anchor", GTK_ANCHOR_WEST, "fill_color", "black", 0);

the decoder callback is not invoked, although the right font file is
being found and displayed

    $ ./gfs
    Selected: LilyPond-feta 32.

    $ l ~/.fonts
    totaal 32
    -rw-rw-r--    1 janneke  janneke     30628 2004-06-15 20:39 

That's the only LilyPond font that the font selector finds.  [I've also
tried with a plain .pfa font.]

What do I have to do for the decoder pango_fc_afm_find_decoder () to
get called?

Does Pango use the `wrong' map, ie, one without the decoder?  Should I
tell the canvas to use Pango's FT2 backend?  How?

Please bear with me, this is my first attempt at a gtk+ class.


Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter       |

reply via email to

[Prev in Thread] Current Thread [Next in Thread]