Re: question on font face creation



Problem solved. I made a mistake by not registering basic-fc module


--- On Sun, 25/1/09, iwanj <i_junianto yahoo co uk> wrote:

> From: iwanj <i_junianto yahoo co uk>
> Subject: question on font face creation
> To: gtk-i18n-list gnome org
> Date: Sunday, 25 January, 2009, 1:36 AM
> 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
> 
> 
> 
>       
> _______________________________________________
> gtk-i18n-list mailing list
> gtk-i18n-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-i18n-list





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