summaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
Diffstat (limited to 'dw')
-rw-r--r--dw/style.cc9
-rw-r--r--dw/style.hh1
2 files changed, 8 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,
diff --git a/dw/style.hh b/dw/style.hh
index c0b41d1d..c3e6a5ff 100644
--- a/dw/style.hh
+++ b/dw/style.hh
@@ -548,6 +548,7 @@ public:
const char *name;
int size;
int weight;
+ int letterSpacing;
FontStyle style;
bool equals(lout::object::Object *other);