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++
Avoid division by zero by fixing typo in text shape ime decoration.
Wolthera van Hövell tot Westerflier11f29afef939
diff --git a/libs/flake/text/KoSvgTextShape.cpp b/libs/flake/text/KoSvgTextShape.cppindex a217be7ecc..8f56aeaf9c 100644--- a/libs/flake/text/KoSvgTextShape.cpp+++ b/libs/flake/text/KoSvgTextShape.cpp@@ -640,7 +640,7 @@ QPainterPath KoSvgTextShape::underlines(int pos, int anchor, KoSvgText::TextDeco}const qreal freetypePixelsToPt = (1.0 / 64.0) * (72. / qMin(d->xRes, d->yRes));- const qreal width = strokeWidth > 0 ? qMax(qreal(strokeWidth/qMax(0, end-(start+1)))*freetypePixelsToPt, minimum): minimum;+ const qreal width = strokeWidth > 0 ? qMax(qreal(strokeWidth/qMax(1, end-(start+1)))*freetypePixelsToPt, minimum): minimum;stroker.setWidth(thick? width*2: width);