content.setAttribute("font-pixel-size", font.pixelSize());
content.setAttribute("font-italic", font.italic());
content.setAttribute("font-underline", font.underline());
-
{
-
QTextCursor cursor(t->document());
cursor.select(QTextCursor::Document);
QColor fontcolor = cursor.charFormat().foreground().color();
content.setAttribute("font-color", colorToString(fontcolor));
- content.setAttribute("font-outline", t->data(101).toDouble());
- content.setAttribute("font-outline-color", t->data(102).toString());
+ if (!t->data(101).isNull()) content.setAttribute("font-outline", t->data(101).toDouble());
+ if (!t->data(102).isNull()) content.setAttribute("font-outline-color", colorToString(QColor(t->data(102).toString())));
}
-
if (!t->data(100).isNull()) {
QStringList effectParams = t->data(100).toStringList();
QString effectName = effectParams.takeFirst();