Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Explicitely write overflow:clip when the text is in a shape.

Wolthera van Hövell tot Westerflier84c8cfede472
diff --git a/libs/flake/text/KoSvgTextShape.cpp b/libs/flake/text/KoSvgTextShape.cpp
index be74472d6c..c16e065c00 100644
--- a/libs/flake/text/KoSvgTextShape.cpp
+++ b/libs/flake/text/KoSvgTextShape.cpp
@@ -2514,6 +2514,9 @@ QMap<QString, QString> KoSvgTextShape::shapeTypeSpecificStyles(SvgSavingContext
shapesInsideList.append(QString("url(#%1)").arg(id));
}
map.insert("shape-inside", shapesInsideList.join(" "));
+ /// Right now we don't support showing glyphs outside the shape. Nor does Inkscape.
+ /// Therefore being excplit about clipping these glyphs is preferable.
+ map.insert("overflow", "clip");
}
if (!d->shapesSubtract.isEmpty()) {
QStringList shapesInsideList;