diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2014-08-28 12:50:49 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2014-08-28 13:41:40 +0100 |
commit | 5ad60caa3c35f86c11545b53052acdb6b9f7a76f (patch) | |
tree | 5f325bfcd9fbb3a73c456fd6d119dd33b0a21c39 /gtk/gtkcssprovider.c | |
parent | f05e9d26120824fac8f952fd6fb34aecfe7b96e4 (diff) | |
download | gtk+-5ad60caa3c35f86c11545b53052acdb6b9f7a76f.tar.gz |
css: Implement font-stretch
The font-stretch CSS property is defined in the Level 3 CSS Fonts
module, available at:
http://dev.w3.org/csswg/css-fonts/#propdef-font-stretch
It allows defining a normal, condensed, or expanded face to the font
description. Pango already supports it, so this is literally just the
CSS parser machinery needed to bridge our CSS to the FontDescription
API.
https://bugzilla.gnome.org/show_bug.cgi?id=735593
Diffstat (limited to 'gtk/gtkcssprovider.c')
-rw-r--r-- | gtk/gtkcssprovider.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 429713b363..8d6b216d19 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -766,7 +766,23 @@ * font-size: 12px; * ]| * - * ## font: [family] [style] [variant] [size]; + * ## font-stretch: [face] + * + * Selects a normal, condensed, or expanded face from a font family. + * + * Absolute keyword values have the following ordering, from narrowest to widest: + * + * - ultra-condensed + * - extra-condensed + * - condensed + * - semi-condensed + * - normal + * - semi-expanded + * - expanded + * - extra-expanded + * - ultra-expanded + * + * ## font: [family] [style] [variant] [stretch] [size]; * * A shorthand for setting a few font properties at once. * - Supports any format accepted by pango_font_description_from_string() |