aboutsummaryrefslogtreecommitdiff
path: root/dw/style.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-10-17 19:22:37 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-10-17 19:22:37 +0200
commitba30ecdf73f0633259a8c64ea2e3ef2e3cbcd65a (patch)
tree0c9a801112a7b6adab1ab9da10bb2a68893f9d32 /dw/style.cc
parent42b823675277e31dd2772a0d4bdb9bf1ff0b5df4 (diff)
add letter-spacing support to CSS subsystem
The implementation in the fltk backend is still missing.
Diffstat (limited to 'dw/style.cc')
-rw-r--r--dw/style.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/dw/style.cc b/dw/style.cc
index 64827a9e..bf02a7fc 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -254,8 +254,11 @@ bool FontAttrs::equals(object::Object *other)
FontAttrs *otherAttrs = (FontAttrs*)other;
return
this == otherAttrs ||
- (size == otherAttrs->size && weight == otherAttrs->weight &&
- style == otherAttrs->style && strcmp (name, otherAttrs->name) == 0);
+ (size == otherAttrs->size &&
+ weight == otherAttrs->weight &&
+ style == otherAttrs->style &&
+ letterSpacing == otherAttrs->letterSpacing &&
+ strcmp (name, otherAttrs->name) == 0);
}
int FontAttrs::hashValue()
@@ -264,6 +267,7 @@ int FontAttrs::hashValue()
h = (h << 5) - h + size;
h = (h << 5) - h + weight;
h = (h << 5) - h + style;
+ h = (h << 5) - h + letterSpacing;
return h;
}
@@ -278,6 +282,7 @@ void Font::copyAttrs (FontAttrs *attrs)
size = attrs->size;
weight = attrs->weight;
style = attrs->style;
+ letterSpacing = attrs->letterSpacing;
}
Font *Font::create0 (Layout *layout, FontAttrs *attrs,