diff options
author | Owen Taylor <otaylor@redhat.com> | 2004-12-16 03:24:07 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2004-12-16 03:24:07 +0000 |
commit | 7be7952f2fb1d34963a041fc9bc4d4841d8de74a (patch) | |
tree | d6417d999b1f4a7a38290eb94004934fe57d1163 /pango/pango-attributes.h | |
parent | da045342eccab09d3d6be33b1b65ebeb5dc2b2f0 (diff) | |
download | pango-7be7952f2fb1d34963a041fc9bc4d4841d8de74a.tar.gz |
Add pixel sizes for fonts (#119081, patch from Chris Lahey)
Wed Dec 15 22:09:42 2004 Owen Taylor <otaylor@redhat.com>
Add pixel sizes for fonts (#119081, patch from Chris Lahey)
* pango/fonts.c pango/pango-font.h:
Add pango_font_description_set_absolute_size(),
pango_font_description_get_size_is_absolute()
* pango/pango-attributes.[ch]: Add pango_attr_size_new_absolute(),
change PANGO_ATTR_SIZE from PangoAttrInt to PangoAttrSize
(preserves compat because first component is identical)
* pango/pangowin32-fontmap.c (pango_win32_font_map_load_font):
For absolute sizes, convert pixels to points, before
calling pango_win32_font_new().
* pango/pangofc-fontmap.c pango/pangoft2.c pango/pangoxft-font.c:
Handle absolute sizes.
Diffstat (limited to 'pango/pango-attributes.h')
-rw-r--r-- | pango/pango-attributes.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h index 69b63187..a1877058 100644 --- a/pango/pango-attributes.h +++ b/pango/pango-attributes.h @@ -54,6 +54,7 @@ typedef struct _PangoAttrClass PangoAttrClass; typedef struct _PangoAttrString PangoAttrString; typedef struct _PangoAttrLanguage PangoAttrLanguage; typedef struct _PangoAttrInt PangoAttrInt; +typedef struct _PangoAttrSize PangoAttrSize; typedef struct _PangoAttrFloat PangoAttrFloat; typedef struct _PangoAttrColor PangoAttrColor; typedef struct _PangoAttrFontDesc PangoAttrFontDesc; @@ -146,6 +147,13 @@ struct _PangoAttrColor PangoColor color; }; +struct _PangoAttrSize +{ + PangoAttribute attr; + int size; + guint absolute : 1; +}; + struct _PangoAttrShape { PangoAttribute attr; @@ -179,6 +187,7 @@ PangoAttribute *pango_attr_background_new (guint16 red, guint16 green, guint16 blue); PangoAttribute *pango_attr_size_new (int size); +PangoAttribute *pango_attr_size_new_absolute (int size); PangoAttribute *pango_attr_style_new (PangoStyle style); PangoAttribute *pango_attr_weight_new (PangoWeight weight); PangoAttribute *pango_attr_variant_new (PangoVariant variant); |