Re: pango_font_map_load_font returning NULL when trying to create with ft2 fontmap
- From: PRADEEP BOTU <pradeep botu samsung com>
- To: Behdad Esfahbod <behdad behdad org>
- Cc: "gtk-i18n-list gnome org" <gtk-i18n-list gnome org>
- Subject: Re: pango_font_map_load_font returning NULL when trying to create with ft2 fontmap
- Date: Wed, 20 May 2009 06:45:43 +0000 (GMT)
Hi behdad
can you eloberate this.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]