public way to get PangoFontDescription from FcPattern or so
- From: Kang Jeong-Hee <Keizi mail co kr>
- To: gtk-app-devel-list gnome org
- Subject: public way to get PangoFontDescription from FcPattern or so
- Date: Tue, 29 Apr 2003 21:12:49 +0900
Hi.
I'm willing to support 'webfont' for http://gybe.sf.net/.
the routine will be:
1. take a font file, specified by CSS or HTML document.
2. load the file into fontconfig.
3. give a family name the font loaded.
and now, gtk widget should be set with the family name.
gtk_widget_modify_font() or other method require PangoFontDescription.
how to build the PangoFontDescription?
* _pango_fc_font_desc_from_pattern(), is private function
build a font_desc from FcPattern.
FcPattern is return by FcFontMatch() thru this procedure:
FcConfigGetCurrent() return a FcConfig.
FcConfigAppFontAddFile() add the font file into FcConfig.
FcNameParse() return a FcPattern from the value of 'font-family'.
FcFontMatch() try a match with FcConfig and FcPattern,
and return a good match of FcPattern.
this is the FcPattern for pango.
* pango_font_description_from_string()
build a font_desc from a string, the 'font-family' value of CSS.
(what a simple!)
in this case, how to ensure that the font which added at runtime
recognized by pango? what happen after setting the font_desc to gtkwidget?
how to put the new FcConfig into pango, after FcConfigAppFontAddFile()?
let me listen to your comment.
thx
kz.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]