diff options
author | Alex Larsson <alexl@redhat.com> | 2001-11-27 19:19:53 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2001-11-27 19:19:53 +0000 |
commit | 02d26fc118ad513f66cf9e9ebf6de1ec3ce548ba (patch) | |
tree | f9186285c6544c351c6b0b11aa8ab9768ab5038a /pango/pangoft2-fontmap.c | |
parent | e369baa4f65aaceb31d8aeaf322e5d1fe0869311 (diff) | |
download | pango-02d26fc118ad513f66cf9e9ebf6de1ec3ce548ba.tar.gz |
pango/pangoft2-private.h Take extra parameter include_size that determines
2001-11-27 Alex Larsson <alexl@redhat.com>
* pango/pangoft2-private.h
* pango/pangoft2-fontmap.c (_pango_ft2_font_desc_from_pattern):
Take extra parameter include_size that determines if the
descriptor includes the size.
* pango/pangoft2.c (_pango_ft2_font_new):
Include size in ft2font->description.
* pango/pangoxft-private.h
* pango/pangoxft-fontmap.c (_pango_xft_font_desc_from_pattern):
Take extra parameter include_size that determines if the
descriptor includes the size.
* pango/pangoxft-font.c:
Include size in xfont->description.
Diffstat (limited to 'pango/pangoft2-fontmap.c')
-rw-r--r-- | pango/pangoft2-fontmap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c index bb4f076a..e472a08d 100644 --- a/pango/pangoft2-fontmap.c +++ b/pango/pangoft2-fontmap.c @@ -653,11 +653,13 @@ pango_ft2_font_map_cache_clear (PangoFT2FontMap *ft2fontmap) */ PangoFontDescription * -_pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern) +_pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern, + gboolean include_size) { PangoFontDescription *desc; PangoStyle style; PangoWeight weight; + double size; char *s; int i; @@ -700,6 +702,9 @@ _pango_ft2_font_desc_from_pattern (MiniXftPattern *pattern) else weight = PANGO_WEIGHT_NORMAL; + if (include_size && MiniXftPatternGetDouble (pattern, XFT_SIZE, 0, &size) == MiniXftResultMatch) + pango_font_description_set_size (desc, size * PANGO_SCALE); + pango_font_description_set_weight (desc, weight); pango_font_description_set_variant (desc, PANGO_VARIANT_NORMAL); @@ -730,7 +735,7 @@ pango_ft2_face_describe (PangoFontFace *face) result_pattern = MiniXftFontMatch ((Display *)1, 0, match_pattern, &res); if (result_pattern) { - desc = _pango_ft2_font_desc_from_pattern (result_pattern); + desc = _pango_ft2_font_desc_from_pattern (result_pattern, FALSE); MiniXftPatternDestroy (result_pattern); } |