summaryrefslogtreecommitdiffstats
path: root/src/desktop-style.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-06-10 11:49:28 +0000
committertavmjong-free <tavmjong@free.fr>2014-06-10 11:49:28 +0000
commita3a5028bba5f7ec0f94bb90119d9ea884231dcdf (patch)
tree5f17397ecc6dcea8b26505edcb7020aa0a61806c /src/desktop-style.cpp
parentProper quoting of CSS 'font-family' fallback lists. (diff)
downloadinkscape-a3a5028bba5f7ec0f94bb90119d9ea884231dcdf.tar.gz
inkscape-a3a5028bba5f7ec0f94bb90119d9ea884231dcdf.zip
Remove 'font' shorthand if we have written out font longhand properties.
(bzr r13416)
Diffstat (limited to 'src/desktop-style.cpp')
-rw-r--r--src/desktop-style.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index 37f537cc5..f6347e5c0 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -211,11 +211,17 @@ sp_desktop_set_style(SPDesktop *desktop, SPCSSAttr *css, bool change, bool write
for (GSList const *i = desktop->selection->itemList(); i != NULL; i = i->next) {
- // If not text, don't apply text attributes (can a group have text attributes?)
+ // If not text, don't apply text attributes (can a group have text attributes? Yes! FIXME)
if ( SP_IS_TEXT(i->data) || SP_IS_FLOWTEXT(i->data)
|| SP_IS_TSPAN(i->data) || SP_IS_TREF(i->data) || SP_IS_TEXTPATH(i->data)
|| SP_IS_FLOWDIV(i->data) || SP_IS_FLOWPARA(i->data) || SP_IS_FLOWTSPAN(i->data)) {
+ // If any font property has changed, then we have written out the font
+ // properties in longhand and we need to remove the 'font' shorthand.
+ if( !sp_repr_css_property_is_unset(css, "font-family") ) {
+ sp_repr_css_unset_property(css, "font");
+ }
+
sp_desktop_apply_css_recursive(SP_OBJECT(i->data), css, true);
} else {