|
|
@ -73,7 +73,7 @@ FontViewFrame::loadFont()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifdef HAVE_XFT
|
|
|
|
#ifdef HAVE_XFT
|
|
|
|
if (m_tableFont) {
|
|
|
|
if (m_tableFont) {
|
|
|
|
XftFontClose(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), (XftFont *)m_tableFont);
|
|
|
|
XftFontClose(this->x11AppDisplay(), (XftFont *)m_tableFont);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_tableFont = 0;
|
|
|
|
m_tableFont = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -108,7 +108,7 @@ FontViewFrame::loadFont()
|
|
|
|
m_fontName = (const char *)matchFamily;
|
|
|
|
m_fontName = (const char *)matchFamily;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_tableFont = XftFontOpenPattern(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), match);
|
|
|
|
m_tableFont = XftFontOpenPattern(this->x11AppDisplay(), match);
|
|
|
|
|
|
|
|
|
|
|
|
if (!m_tableFont) {
|
|
|
|
if (!m_tableFont) {
|
|
|
|
KMessageBox::error(this, i18n("Error: Unable to open best-match font %1").
|
|
|
|
KMessageBox::error(this, i18n("Error: Unable to open best-match font %1").
|
|
|
@ -159,8 +159,8 @@ void FontViewFrame::paintEvent( TQPaintEvent* e )
|
|
|
|
TQColor rpositive(128, 128, 255);
|
|
|
|
TQColor rpositive(128, 128, 255);
|
|
|
|
|
|
|
|
|
|
|
|
Drawable drawable = (Drawable)handle();
|
|
|
|
Drawable drawable = (Drawable)handle();
|
|
|
|
XftDraw *draw = XftDrawCreate(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), drawable,
|
|
|
|
XftDraw *draw = XftDrawCreate(this->x11AppDisplay(), drawable,
|
|
|
|
(Visual *)TQT_TQPAINTDEVICE(this)->x11Visual(), TQT_TQPAINTDEVICE(this)->x11Colormap());
|
|
|
|
(Visual *)this->x11Visual(), this->x11Colormap());
|
|
|
|
|
|
|
|
|
|
|
|
TQColor pen(TQt::black);
|
|
|
|
TQColor pen(TQt::black);
|
|
|
|
XftColor col;
|
|
|
|
XftColor col;
|
|
|
@ -207,7 +207,7 @@ void FontViewFrame::paintEvent( TQPaintEvent* e )
|
|
|
|
XftDrawGlyphs(draw, &col, (XftFont *)m_tableFont, x, y, &ui, 1);
|
|
|
|
XftDrawGlyphs(draw, &col, (XftFont *)m_tableFont, x, y, &ui, 1);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
FcChar32 ch = m_row * 256 + (j - 1) * 16 + i - 1;
|
|
|
|
FcChar32 ch = m_row * 256 + (j - 1) * 16 + i - 1;
|
|
|
|
if (XftCharExists(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), (XftFont *)m_tableFont, ch)) {
|
|
|
|
if (XftCharExists(this->x11AppDisplay(), (XftFont *)m_tableFont, ch)) {
|
|
|
|
XftDrawString32(draw, &col, (XftFont *)m_tableFont, x, y, &ch, 1);
|
|
|
|
XftDrawString32(draw, &col, (XftFont *)m_tableFont, x, y, &ch, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|