diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-11 22:21:13 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-11-11 22:21:13 +0100 |
commit | c76ae0059b90c0ed62918d9e4a1a2e0b739f00b7 (patch) | |
tree | ec2a98a0d649f5b3760aadaea80b60dde71b335e | |
parent | a6cf7cc8777f33cf04510fd7cb4d26e55a3a3d25 (diff) |
use CssProperty::FontWeightExtensions
-rw-r--r-- | src/cssparser.cc | 8 | ||||
-rw-r--r-- | src/cssparser.hh | 19 |
2 files changed, 4 insertions, 23 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc index c01d8edc..f45a6c80 100644 --- a/src/cssparser.cc +++ b/src/cssparser.cc @@ -658,13 +658,13 @@ static bool Css_parse_value (CssParser *parser, ival = 0; } else if (parser->ttype == CSS_TK_SYMBOL) { if (strcmp (parser->tval, "normal") == 0) - ival = CSS_FONT_WEIGHT_NORMAL; + ival = CssProperty::CSS_FONT_WEIGHT_NORMAL; if (strcmp (parser->tval, "bold") == 0) - ival = CSS_FONT_WEIGHT_BOLD; + ival = CssProperty::CSS_FONT_WEIGHT_BOLD; if (strcmp (parser->tval, "bolder") == 0) - ival = CSS_FONT_WEIGHT_BOLDER; + ival = CssProperty::CSS_FONT_WEIGHT_BOLDER; if (strcmp (parser->tval, "lighter") == 0) - ival = CSS_FONT_WEIGHT_LIGHTER; + ival = CssProperty::CSS_FONT_WEIGHT_LIGHTER; } if (ival != 0) { diff --git a/src/cssparser.hh b/src/cssparser.hh index a1feb473..4403a4b9 100644 --- a/src/cssparser.hh +++ b/src/cssparser.hh @@ -86,25 +86,6 @@ enum { #define CSS_LENGTH_VALUE(l) ( ( (float)((l) & ~7) ) / (1 << 19) ) #define CSS_LENGTH_TYPE(l) ((l) & 7) -/* - * Font weights are either absolute (number between 100 and 900), or have - * the following relative values: - */ -#define CSS_FONT_WEIGHT_LIGHTER -1 -#define CSS_FONT_WEIGHT_BOLDER -2 - -/* This is the difference used. */ -#define CSS_FONT_WEIGHT_STEP 300 - -/* Some special font weights. */ -#define CSS_FONT_WEIGHT_LIGHT 100 -#define CSS_FONT_WEIGHT_NORMAL 400 -#define CSS_FONT_WEIGHT_BOLD 700 - -#define CSS_FONT_WEIGHT_MIN 100 -#define CSS_FONT_WEIGHT_MAX 900 - - void a_Css_init (void); void a_Css_freeall (void); |