changeset 561:514488f329ea

use CssProperty::FontWeightExtensions
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Tue, 11 Nov 2008 22:21:13 +0100
parents 7b7294440ee2
children 145b8a4d65b3
files src/cssparser.cc src/cssparser.hh
diffstat 2 files changed, 4 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/cssparser.cc	Tue Nov 11 21:46:33 2008 +0100
+++ b/src/cssparser.cc	Tue Nov 11 22:21:13 2008 +0100
@@ -658,13 +658,13 @@
             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) {
--- a/src/cssparser.hh	Tue Nov 11 21:46:33 2008 +0100
+++ b/src/cssparser.hh	Tue Nov 11 22:21:13 2008 +0100
@@ -86,25 +86,6 @@
 #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);