summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-01-16 09:52:02 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-01-16 09:52:02 +0000
commit56e7902a63f2036ea46a386c9d80827d6420f143 (patch)
tree6363106a16cc800436c945d09d88bbad951b5997 /pango/pangofc-fontmap.c
parent7a102793913cb7a1a0eefbbfc9d5c0d04c9eb868 (diff)
downloadpango-56e7902a63f2036ea46a386c9d80827d6420f143.tar.gz
New attribute types PANGO_ATTR_GRAVITY and PANGO_ATTR_GRAVITY_HINT. New
2007-01-16 Behdad Esfahbod <behdad@gnome.org> * pango/pango-attributes.h: * pango/pango-attributes.c: New attribute types PANGO_ATTR_GRAVITY and PANGO_ATTR_GRAVITY_HINT. New public functions: pango_attr_gravity_new() pango_attr_gravity_hint_new() * pango/pango-context.c (update_attr_iterator), (itemize_state_init), (itemize_state_add_character), (get_shaper_and_font), (itemize_state_update_for_new_run): Handle gravity and gravity_hint attributes. * pango/pango-utils.h: * pango/pango-utils.c: New public function: pango_parse_enum() * pango/pango-markup.c (span_parse_func): Parse gravity and gravity_hint attributes for <span>. Optimize a bit. * pango/pango-markup.c (parse_absolute_size), (attr_strcmp), (span_parse_int), (span_parse_boolean), (span_parse_color), (span_parse_enum), (span_parse_func): Use pango_scan_int(), pango_color_parse(), and pango_parse_enum(). Also, ignore '-' and '_' differences when matching attribute names for <span>. * examples/renderdemo.c (parse_enum), (parse_ellipsis), (parse_gravity), (parse_gravity_hint), (parse_hinting), (parse_wrap): Use a generic parse_enum() that uses pango_parse_enum(). * modules/basic/basic-fc.c (basic_engine_shape): * pango/pangofc-fontmap.c (pango_fc_make_pattern): Use PANGO_GRAVITY_IS_VERTICAL(). * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/text-attributes.sgml: * docs/tmpl/utils.sgml: Update. svn path=/trunk/; revision=2145
Diffstat (limited to 'pango/pangofc-fontmap.c')
-rw-r--r--pango/pangofc-fontmap.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index a1e4ee35..e901f07a 100644
--- a/pango/pangofc-fontmap.c
+++ b/pango/pangofc-fontmap.c
@@ -823,18 +823,7 @@ pango_fc_make_pattern (const PangoFontDescription *description,
#endif
gravity = pango_font_description_get_gravity (description);
- switch (gravity)
- {
- case PANGO_GRAVITY_SOUTH:
- case PANGO_GRAVITY_NORTH:
- default:
- vertical = FcFalse;
- break;
- case PANGO_GRAVITY_EAST:
- case PANGO_GRAVITY_WEST:
- vertical = FcTrue;
- break;
- }
+ vertical = PANGO_GRAVITY_IS_VERTICAL (gravity) ? FcTrue : FcFalse;
/* The reason for passing in FC_SIZE as well as FC_PIXEL_SIZE is
* to work around a bug in libgnomeprint where it doesn't look