Re: pango_font_map_load_font returning NULL when trying to create with ft2 fontmap



This probably means that you have not installed fontconfig properly so it cannot find any fonts.

behdad

On 05/19/2009 08:05 AM, PRADEEP BOTU wrote:
Problem: pango_font_map_load_font returning NULL when trying to create with context created uising pango_ft2_get_context/ pango_context_new and fontmap created using pango_ft2_font_map_for_display.

   Code snippet:

    #include<glib.h>
#include<gmodule.h>
#include "pango.h"
#include "pangoft2.h"

    PangoFontMap *fontmap = pango_ft2_font_map_for_display();
   PangoContext *context;

    context = pango_context_new ();

     pango_context_set_font_map(context, fontmap);
   /* No arguments given */

     PangoFontDescription *desc = pango_font_description_from_string("Verdana");

    /* spits warnings if font cannot be loaded */
  PangoFont *font = pango_font_map_load_font (fontmap2, context, desc);

    g_object_unref (font);


   Here font is returrning NULL. Normally it should return PangoFont onject. If i use win32 context, i am able to create the font object..

  But if i use win32 fontmap and win32 context, font retuning valid object.

  like: PangoFontMap *fontmap = pango_win32_font_map_for_display();

  context = pango_win32_get_context ();

Help me in this regard..

thanks,
pradeep Botu
_______________________________________________
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]