pango r2603 - in trunk: . docs pango
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: pango r2603 - in trunk: . docs pango
- Date: Mon, 21 Apr 2008 22:26:33 +0100 (BST)
Author: behdad
Date: Mon Apr 21 21:26:33 2008
New Revision: 2603
URL: http://svn.gnome.org/viewvc/pango?rev=2603&view=rev
Log:
2008-04-21 Behdad Esfahbod <behdad gnome org>
Bug 490669 â add some <span> attribute aliases
* docs/pango_markup.sgml:
* pango/pango-markup.c (span_parse_func):
Add fgcolor, bgcolor, font, font_size, font_weight, font_variant, ...
Modified:
trunk/ChangeLog
trunk/docs/pango_markup.sgml
trunk/pango/pango-markup.c
Modified: trunk/docs/pango_markup.sgml
==============================================================================
--- trunk/docs/pango_markup.sgml (original)
+++ trunk/docs/pango_markup.sgml Mon Apr 21 21:26:33 2008
@@ -46,7 +46,9 @@
tags. <span> has the following attributes:
<variablelist><title><span> attributes</title>
-<varlistentry><term>font_desc</term>
+<varlistentry>
+<term>font</term>
+<term>font_desc</term>
<listitem><para>
A font description string, such as "Sans Italic 12". See
<link linkend="pango-font-description-from-string">pango_font_description_from_string()</link>
@@ -56,51 +58,57 @@
not italic.</para></listitem>
</varlistentry>
-<varlistentry><term>font_family</term>
+<varlistentry>
+<term>font_family</term>
+<term>face</term>
<listitem><para>
A font family name
</para></listitem>
</varlistentry>
-<varlistentry><term>face</term>
-<listitem><para>
-Synonym for font_family
-</para></listitem>
-</varlistentry>
-
-<varlistentry><term>size</term>
+<varlistentry>
+<term>font_size</term>
+<term>size</term>
<listitem><para>
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
-<literal>font_desc='12.5'</literal> rather than
+font description using 'font'; you can use
+<literal>font='12.5'</literal> rather than
<literal>size='12800'</literal>.
</para></listitem>
</varlistentry>
-<varlistentry><term>style</term>
+<varlistentry>
+<term>font_style</term>
+<term>style</term>
<listitem><para>
One of 'normal', 'oblique', 'italic'
</para></listitem>
</varlistentry>
-<varlistentry><term>weight</term>
+<varlistentry>
+<term>font_weight</term>
+<term>weight</term>
<listitem><para>
One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy',
or a numeric weight
</para></listitem>
</varlistentry>
-<varlistentry><term>variant</term>
+<varlistentry>
+<term>font_variant</term>
+<term>variant</term>
<listitem><para>
-'normal' or 'smallcaps'
+One of 'normal' or 'smallcaps'
</para></listitem>
</varlistentry>
-<varlistentry><term>stretch</term>
+<varlistentry>
+<term>font_stretch</term>
+<term>stretch</term>
<listitem><para>
One of 'ultracondensed', 'extracondensed', 'condensed',
'semicondensed', 'normal', 'semiexpanded', 'expanded',
@@ -108,14 +116,19 @@
</para></listitem>
</varlistentry>
-<varlistentry><term>foreground</term>
+<varlistentry>
+<term>foreground</term>
+<term>fgcolor</term>
+<term>color</term>
<listitem><para>
An RGB color specification such as '#00FF00' or a color name such as
'red'
</para></listitem>
</varlistentry>
-<varlistentry><term>background</term>
+<varlistentry>
+<term>background</term>
+<term>bgcolor</term>
<listitem><para>
An RGB color specification such as '#00FF00' or a color name such as
'red'
Modified: trunk/pango/pango-markup.c
==============================================================================
--- trunk/pango/pango-markup.c (original)
+++ trunk/pango/pango-markup.c Mon Apr 21 21:26:33 2008
@@ -1008,11 +1008,20 @@
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 @@
break;
default:
CHECK_ATTRIBUTE (background);
+ CHECK_ATTRIBUTE2 (background, "bgcolor");
CHECK_ATTRIBUTE2(foreground, "color");
CHECK_ATTRIBUTE (rise);
CHECK_ATTRIBUTE (variant);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]