diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2008-12-08 03:28:29 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2008-12-08 03:28:29 +0000 |
commit | 9a7e5dd5e9a7f5f5397273082a7ca356699106d6 (patch) | |
tree | 01aecf826f06a307f29b6055c0e6cfce0281a096 /pango/pangofc-fontmap.c | |
parent | 329878c07db2f693ffc08a3afc55acb89a701098 (diff) | |
download | pango-9a7e5dd5e9a7f5f5397273082a7ca356699106d6.tar.gz |
Bug 563557 – set g_get_prgname() in fc pattern
2008-12-07 Behdad Esfahbod <behdad@gnome.org>
Bug 563557 – set g_get_prgname() in fc pattern
* docs/pango-sections.txt:
* pango/pangofc-fontmap.c (pango_fc_make_pattern):
* pango/pangofc-fontmap.h:
Add PANGO_FC_PRGNAME which is the fontconfig element "pangoprgname".
Populate it on all our fontconfig search patterns using
g_get_prgname(). See bug for sample use.
svn path=/trunk/; revision=2751
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r-- | pango/pangofc-fontmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index 4bb51885..5c5dbe58 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -800,6 +800,7 @@ pango_fc_make_pattern (const PangoFontDescription *description, double dpi) { FcPattern *pattern; + const char *prgname; int slant; int weight; PangoGravity gravity; @@ -810,6 +811,7 @@ pango_fc_make_pattern (const PangoFontDescription *description, int width; #endif + prgname = g_get_prgname (); slant = pango_fc_convert_slant_to_fc (pango_font_description_get_style (description)); weight = pango_fc_convert_weight_to_fc (pango_font_description_get_weight (description)); #ifdef FC_WIDTH @@ -857,6 +859,9 @@ pango_fc_make_pattern (const PangoFontDescription *description, FcPatternAddString (pattern, PANGO_FC_GRAVITY, value->value_nick); } + if (prgname) + FcPatternAddString (pattern, PANGO_FC_PRGNAME, prgname); + return pattern; } |