aboutsummaryrefslogtreecommitdiff
path: root/src/styleengine.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/styleengine.cc')
-rw-r--r--src/styleengine.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 3233b69c..c7820760 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -41,6 +41,7 @@ StyleEngine::StyleEngine (dw::core::Layout *layout) {
font_attrs.weight = 400;
font_attrs.style = FONT_STYLE_NORMAL;
font_attrs.letterSpacing = 0;
+ font_attrs.fontVariant = FONT_VARIANT_NORMAL;
style_attrs.initValues ();
style_attrs.font = Font::create (layout, &font_attrs);
@@ -227,7 +228,7 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
char *c, *fontName;
int lineHeight;
- /* Determine font first so it can be used to resolve relative lenths. */
+ /* Determine font first so it can be used to resolve relative lengths. */
for (int i = 0; i < props->size (); i++) {
CssProperty *p = props->getRef (i);
@@ -363,6 +364,9 @@ void StyleEngine::apply (StyleAttrs *attrs, CssPropertyList *props) {
else if (fontAttrs.letterSpacing < -1000)
fontAttrs.letterSpacing = -1000;
break;
+ case CSS_PROPERTY_FONT_VARIANT:
+ fontAttrs.fontVariant = (FontVariant) p->value.intVal;
+ break;
default:
break;
}