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



On 05/20/2009 03:01 AM, PRADEEP BOTU wrote:
can u explain more on what you told  "This probably means that you have not installed fontconfig properly so it
cannot find any fonts."

Well, it really just means that :). If pango can't find any fonts, it returns NULL from that function. I don't know *why* it failed to find any. But I know that pango simply asks fontconfig to give it a font. So fontconfig failed to find any fonts. That's as much I can tell. I don't really know how fontconfig works on windows.

behdad

------- Original Message -------
Sender : Behdad Esfahbod<behdad behdad org>
Date   : May 20, 2009 15:55 (GMT+09:00)
Title  : Re: pango_font_map_load_font returning NULL when trying to create with
  ft2	fontmap

On 05/20/2009 02:45 AM, PRADEEP BOTU wrote:
    Hi behdad

can you eloberate this.

Unfortunately I can't.  I have no access to or knowledge about win32.

behdad


how to install fontconfig. is it different for win32 and freetype rendering.

I am able to load the font using win32. But i am failing to load using freetype.

thanks,
Pradeep


------- Original Message -------
Sender : Behdad Esfahbod<behdad behdad org>
Date   : May 20, 2009 01:39 (GMT+09:00)
Title  : 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]