loading an external font using pango



Hello list,

The subject already says what I need.

Somewhere in the example pages of Pango i found the following code.

PangoFontDescription * pango_font_desc =
pango_font_description_from_string("Sans Bold 12");

This works for me.


But I dont want to use Sans font. I have my own ttf font. I have the
path of the font.  I know the size.

Now what should I right so that pango_font_desc will be filled with
font path and size?

I used this,
pango_font_description_set_family(pango_font_desc, this->font_family.c_str());

But it doesn't work.

how do I replace the pango_font_description_from_string("Sans Bold
12") call with font path and font size call?


Thanks



Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)


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