Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.3.0
-
None
Description
When drawing texts on frame buffer with rotations, some characters may not be well positioned. For example, in string "Mulberry", the two "r"s will be too close with some rotation angles. Is it possible to fix this drawing quality problem in the embedded side?
Below is an example to reproduce this problem (run on Qtopia Core 4.3.0 with QVFb 480x272, 32 bit):
class TextRenderer : public QWidget
{
protected:
virtual void paintEvent(QPaintEvent *event)
{
int stringCount = 50;
const QString c_TestString = "Mulberry";
QVector<QPoint> points;
QVector<int> angles;
// leave a border to prevent going off edge
QFont defaultFont;
QFontMetrics fontMetrics(defaultFont);
int stringWidth = fontMetrics.width(c_TestString);
for (int i=0; i<stringCount; i++)
QPen pen(Qt::lightGray);
QPainter painter(this);
painter.fillRect(rect(), Qt::white);
painter.setPen(pen);
int i=0;
foreach(const QPoint &point, points)
}
};
int main(int argc, char **argv)
{
QApplication app(argc, argv, QApplication::GuiServer);
TextRenderer testScreen;
testScreen.showFullScreen();
return app.exec();
}