Re: Re: How to add new font file information to fontconfig (pfr files)



If i delete fonts.conf and adding below code, i am able to laod the file. But i am unable to render italic or bold characters. I am setting style information using pango and trying to render it. But it is rendering only normal text.  For style information what i have to do? 
 char *fontFile = "Amelia.pfr";
 FcConfig *config = FcInitLoadConfigAndFonts();
 FcBool ret = FcConfigAppFontAddFile(config, reinterpret_cast<const FcChar8*>(fontFile));
ret = FcConfigSetCurrent(config);

Thanks,
Pradeep.


------- Original Message -------
Sender : Girish<girish a geodesic com> 
Date   : Jun 15, 2009 19:18 (GMT+09:00)
Title  : Re: How to add new font file information to fontconfig (pfr files)

PRADEEP BOTU wrote:
>    I am trying to add pfr font files information to my fontconfig and want to use it with pango .
>
>   Able to load font files which are in C:\WINDOWS\Fonts folder.
>
>   I have kept Amelia.pfr font file in etc/Fonts folder of fontconfig. But i am unable to load it.
>
>  
> i am also trying in the following way
>
> char *fontFile = "Amelia.pfr";
> FcConfig *config = FcInitLoadConfigAndFonts();
> FcBool ret = FcConfigAppFontAddFile(config, reinterpret_cast<const FcChar8*>(fontFile));
> ret = FcConfigSetCurrent(config);
>
> But when i am trying to load it through pango it is unable to load this file. it is loading verdana.ttf 
> Any thing wrong in this approach?
>
> thanks,
> Pradeep.
> _______________________________________________
> gtk-i18n-list mailing list
> gtk-i18n-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
>
>   
After loading you need to run "fc-cache -f " to refresh the font cache 
files.


regards Girish

-- 

----------------------------------------------------------------------
Girish A J
Software-Engineer,		  		Ph: (80) 6655 1000   Ext 117
Geodesic Information Systems Ltd.	Fax:(80) 6655 1029
Nagashetty Halli.
Bangalore - 560 094
URL  http://www.geodesic.com http://www.geoamida.com
----------------------------------------------------------------------- 



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