mirror of
https://github.com/tumic0/QtPBFImagePlugin.git
synced 2024-11-24 03:35:54 +01:00
Yet another text path algorithm fix
Floor the font sizes
This commit is contained in:
parent
c97f2235a9
commit
d7aa49b7ea
@ -322,7 +322,7 @@ Style::Layer::Layout::Layout(const QJsonObject &json)
|
|||||||
QFont Style::Layer::Layout::font(int zoom) const
|
QFont Style::Layer::Layout::font(int zoom) const
|
||||||
{
|
{
|
||||||
QFont font(_font);
|
QFont font(_font);
|
||||||
font.setPixelSize(qRound(_textSize.value(zoom)));
|
font.setPixelSize(_textSize.value(zoom));
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,9 @@ static QPainterPath textPath(const QPainterPath &path, qreal textWidth,
|
|||||||
angle = a;
|
angle = a;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QPainterPath();
|
return (length > textWidth)
|
||||||
|
? subpath(lines, last, lines.size() - 1, length - textWidth)
|
||||||
|
: QPainterPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool reverse(const QPainterPath &path)
|
static bool reverse(const QPainterPath &path)
|
||||||
|
Loading…
Reference in New Issue
Block a user