Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.1.0
-
None
Description
The QPainter::drawText() does not display correctly some characters using the font "GraecaII".
ALL characters higher than 128 are replaced with other characters. Enclosed there are two images: the first one shows the correct layout of GraecaII font, the second one shows a QT Window that uses the following code to
display all the characters with negative advances and the complete map.
/////////////////////////////////////////////////////
void TextArea::paintEvent(QPaintEvent *)
;
uchar acc2[] =
;
QString str1;
QString str2;
char tmp[64];
for(int n = 0; n < sizeof(acc1) / sizeof(int); n++)
{ str1.append(QChar('a')); str1.append(QChar::fromLatin1((char)acc1[n])); }for(int n = 0; n < sizeof(acc2) / sizeof(uchar); n++)
{ str2.append(QChar('a')); str2.append(QChar(acc2[n])); } QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
QFont font(tr("GraecaII"), 16);
QFont font2(tr("Arial"), 8);
QTextOption option(Qt::AlignLeft);
option.setWrapMode(QTextOption::WordWrap);
option.setFlags(0);
painter.setFont(font);
painter.drawText(5, 20, str1);
painter.drawText(5, 50, str2);
int _w = 40;
int _h = 40;
int _x, _y;
for(int x = 0; x < 16; x++)
{
for(int y = 0; y < 16; y++)
}
}