niko
15th August 2006, 17:53
I'm painting text through QPainter::drawText.
How can I adjust the Letter-Spacing?
(add additional space between the characters)
QFont::setStretch doesn't work - as it stretches the whole character.
I think it would be possible to draw one character after the other and calculate the position using QFontMetrics::leftBearing, QFontMetrics::rightBearing and QFontMetrics::width.
But there must be a simpler solution!
thanks, niko
How can I adjust the Letter-Spacing?
(add additional space between the characters)
QFont::setStretch doesn't work - as it stretches the whole character.
I think it would be possible to draw one character after the other and calculate the position using QFontMetrics::leftBearing, QFontMetrics::rightBearing and QFontMetrics::width.
But there must be a simpler solution!
thanks, niko