From: Behdad Esfahbod Date: Mon, 21 Apr 2008 21:26:33 +0000 (+0000) Subject: Bug 490669 – add some attribute aliases X-Git-Tag: PANGO_1_21_0~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=451d5a70fe771cf19e570e9896ad566239974ece;p=platform%2Fupstream%2Fpango.git Bug 490669 – add some attribute aliases 2008-04-21 Behdad Esfahbod Bug 490669 – add some attribute aliases * docs/pango_markup.sgml: * pango/pango-markup.c (span_parse_func): Add fgcolor, bgcolor, font, font_size, font_weight, font_variant, ... svn path=/trunk/; revision=2603 --- diff --git a/ChangeLog b/ChangeLog index b26835c..0113fab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-04-21 Behdad Esfahbod + Bug 490669 – add some attribute aliases + + * docs/pango_markup.sgml: + * pango/pango-markup.c (span_parse_func): + Add fgcolor, bgcolor, font, font_size, font_weight, font_variant, ... + +2008-04-21 Behdad Esfahbod + Bug 501334 – Make pango_cairo_[show_]*[_path]() functions preserve current point diff --git a/docs/pango_markup.sgml b/docs/pango_markup.sgml index ba96a9d..0c992a4 100644 --- a/docs/pango_markup.sgml +++ b/docs/pango_markup.sgml @@ -46,7 +46,9 @@ general markup tag is <span>, then there are some convenience tags. <span> has the following attributes: <span> attributes -font_desc + +font +font_desc A font description string, such as "Sans Italic 12". See pango_font_description_from_string() @@ -56,51 +58,57 @@ other span attributes will override this description. So if you have not italic. -font_family + +font_family +face A font family name -face - -Synonym for font_family - - - -size + +font_size +size Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'. If you want to specify a absolute size, it's usually easier to take advantage of the ability to specify a partial -font description using 'font_desc'; you can use -font_desc='12.5' rather than +font description using 'font'; you can use +font='12.5' rather than size='12800'. -style + +font_style +style One of 'normal', 'oblique', 'italic' -weight + +font_weight +weight One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight -variant + +font_variant +variant -'normal' or 'smallcaps' +One of 'normal' or 'smallcaps' -stretch + +font_stretch +stretch One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', @@ -108,14 +116,19 @@ One of 'ultracondensed', 'extracondensed', 'condensed', -foreground + +foreground +fgcolor +color An RGB color specification such as '#00FF00' or a color name such as 'red' -background + +background +bgcolor An RGB color specification such as '#00FF00' or a color name such as 'red' diff --git a/pango/pango-markup.c b/pango/pango-markup.c index abb3890..449810e 100644 --- a/pango/pango-markup.c +++ b/pango/pango-markup.c @@ -1008,11 +1008,20 @@ span_parse_func (MarkupData *md, switch (names[i][0]) { case 'f': - CHECK_ATTRIBUTE2(family, "face"); CHECK_ATTRIBUTE (fallback); + CHECK_ATTRIBUTE2(desc, "font"); CHECK_ATTRIBUTE2(desc, "font_desc"); + CHECK_ATTRIBUTE2(family, "face"); + CHECK_ATTRIBUTE2(family, "font_family"); + CHECK_ATTRIBUTE2(size, "font_size"); + CHECK_ATTRIBUTE2(stretch, "font_stretch"); + CHECK_ATTRIBUTE2(style, "font_style"); + CHECK_ATTRIBUTE2(variant, "font_variant"); + CHECK_ATTRIBUTE2(weight, "font_weight"); + CHECK_ATTRIBUTE (foreground); + CHECK_ATTRIBUTE2 (foreground, "fgcolor"); break; case 's': CHECK_ATTRIBUTE (size); @@ -1035,6 +1044,7 @@ span_parse_func (MarkupData *md, break; default: CHECK_ATTRIBUTE (background); + CHECK_ATTRIBUTE2 (background, "bgcolor"); CHECK_ATTRIBUTE2(foreground, "color"); CHECK_ATTRIBUTE (rise); CHECK_ATTRIBUTE (variant);