question on font face creation



Hi,

I'm porting Pango as part of Cairo for Symbian project
(http://code.google.com/p/cairo-for-symbian). Cairo for Symbian is built with Freetype and Fontconfig backend. It works fine for drawing text
using cairo_ft_font_face_create_for_pattern, but
I'm having problem when trying to use Pango to do the same thing,
and I think the problem is with font face creation i.e. text is rendered as empty boxes. 

My Pango application code look like this,
PangoFontDescription* desc = pango_font_description_new();
pango_font_description_set_family(desc, "Sans");
pango_font_description_set_weight(desc, PANGO_WEIGHT_NORMAL);
pango_font_description_set_absolute_size(desc, 40 * PANGO_SCALE);

PangoLayout *layout = pango_cairo_create_layout(cr);
pango_layout_set_font_description(layout, desc);
pango_layout_set_text(layout, "hello pango", -1);
...	
cairo_move_to (cr, 20.0, 20.0);
pango_cairo_show_layout(cr, layout);
...

I tried to put breakpoint at this function in pangocairo-fcfont.c
pango_cairo_fc_font_create_font_face (PangoCairoFont *cfont)
{
  PangoFcFont *fcfont = (PangoFcFont *) (cfont);

  return cairo_ft_font_face_create_for_pattern (fcfont->font_pattern);
}

but it seems it never get called. Any suggestion which Pango code to look 
at would be appreciated.

Cheers,
iwanj






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