From a830bf10b7d4ed2c83ffe68c0b22d7c4ba9860b0 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 1 Mar 2012 13:24:30 -0600 Subject: Rename additional global TQt functions --- src/kernel/qfontengine_x11.cpp | 102 ++++++++++++++++++++--------------------- 1 file changed, 51 insertions(+), 51 deletions(-) (limited to 'src/kernel/qfontengine_x11.cpp') diff --git a/src/kernel/qfontengine_x11.cpp b/src/kernel/qfontengine_x11.cpp index ae27f9a..c9f5f08 100644 --- a/src/kernel/qfontengine_x11.cpp +++ b/src/kernel/qfontengine_x11.cpp @@ -139,7 +139,7 @@ static QBitmap transform(Display *dpy, const QBitmap &source, int xoff, int yof bm = QBitmap( w, h, dptr, QImage::systemBitOrder() != QImage::BigEndian ); } else { #if defined(QT_CHECK_RANGE) - qWarning( "QFontEngineXft::tranform: xform failed"); + tqWarning( "QFontEngineXft::tranform: xform failed"); #endif } @@ -266,7 +266,7 @@ void QFontEngineBox::draw( QPainter *p, int x, int y, const QTextEngine *engine, glyph_metrics_t ci = boundingBox( glyphs, offsets, numGlyphs ); p->drawRect( x + ci.x, y + ci.y, ci.width, ci.height ); p->drawRect( x + ci.x, y + 50 + ci.y, ci.width, ci.height ); - qDebug("bounding rect=%d %d (%d/%d)", ci.x, ci.y, ci.width, ci.height ); + tqDebug("bounding rect=%d %d (%d/%d)", ci.x, ci.y, ci.width, ci.height ); p->restore(); int xp = x; int yp = y; @@ -323,7 +323,7 @@ void QFontEngineBox::draw( QPainter *p, int x, int y, const QTextEngine *engine, x += offsets[i].x; y += offsets[i].y; p->drawRect( x + ci.x, y + 50 + ci.y, ci.width, ci.height ); - qDebug("bounding ci[%d]=%d %d (%d/%d) / %d %d offset=(%d/%d)", i, ci.x, ci.y, ci.width, ci.height, + tqDebug("bounding ci[%d]=%d %d (%d/%d) / %d %d offset=(%d/%d)", i, ci.x, ci.y, ci.width, ci.height, ci.xoff, ci.yoff, offsets[i].x, offsets[i].y ); x += ci.xoff; y += ci.yoff; @@ -558,7 +558,7 @@ void QFontEngineXLFD::draw( QPainter *p, int x, int y, const QTextEngine *engine if ( !si->num_glyphs ) return; -// qDebug("QFontEngineXLFD::draw( %d, %d, numglyphs=%d", x, y, si->num_glyphs ); +// tqDebug("QFontEngineXLFD::draw( %d, %d, numglyphs=%d", x, y, si->num_glyphs ); Display *dpy = QPaintDevice::x11AppDisplay(); Qt::HANDLE hd = p->device()->handle(); @@ -633,7 +633,7 @@ void QFontEngineXLFD::draw( QPainter *p, int x, int y, const QTextEngine *engine matrix += ' '; } matrix += ']'; - //qDebug("m: %2.2f %2.2f %2.2f %2.2f, matrix=%s", p->m11(), p->m12(), p->m21(), p->m22(), matrix.data()); + //tqDebug("m: %2.2f %2.2f %2.2f %2.2f, matrix=%s", p->m11(), p->m12(), p->m21(), p->m22(), matrix.data()); xlfd_transformed.replace( pos, endPos-pos, matrix ); x_font_load_error = FALSE; @@ -642,7 +642,7 @@ void QFontEngineXLFD::draw( QPainter *p, int x, int y, const QTextEngine *engine XSync( dpy, FALSE ); XSetErrorHandler( old_handler ); if ( x_font_load_error ) { - //qDebug( "couldn't load transformed font" ); + //tqDebug( "couldn't load transformed font" ); font_id = _fs->fid; xlfd_transformations = XlfdTrUnsupported; } else { @@ -678,7 +678,7 @@ void QFontEngineXLFD::draw( QPainter *p, int x, int y, const QTextEngine *engine glyph_metrics_t ci = boundingBox( glyphs, advances, offsets, si->num_glyphs ); p->drawRect( x + ci.x, y + ci.y, ci.width, ci.height ); p->drawRect( x + ci.x, y + 100 + ci.y, ci.width, ci.height ); - qDebug("bounding rect=%d %d (%d/%d)", ci.x, ci.y, ci.width, ci.height ); + tqDebug("bounding rect=%d %d (%d/%d)", ci.x, ci.y, ci.width, ci.height ); p->restore(); int xp = x; int yp = y; @@ -705,7 +705,7 @@ void QFontEngineXLFD::draw( QPainter *p, int x, int y, const QTextEngine *engine int i = si->num_glyphs; while( i-- ) { advance_t adv = advances[i]; - // qDebug("advance = %d/%d", adv.x, adv.y ); + // tqDebug("advance = %d/%d", adv.x, adv.y ); x += adv; glyph_metrics_t gi = boundingBox( glyphs[i] ); int xp = x-offsets[i].x-gi.xoff; @@ -726,7 +726,7 @@ void QFontEngineXLFD::draw( QPainter *p, int x, int y, const QTextEngine *engine if (!glyphAttributes[i].zeroWidth && xp < SHRT_MAX && xp > SHRT_MIN) XDrawString16(dpy, hd, gc, xp, yp, chars+i, 1 ); advance_t adv = advances[i]; - // qDebug("advance = %d/%d", adv.x, adv.y ); + // tqDebug("advance = %d/%d", adv.x, adv.y ); x += adv; i++; } @@ -760,7 +760,7 @@ void QFontEngineXLFD::draw( QPainter *p, int x, int y, const QTextEngine *engine for ( int i = 0; i < si->num_glyphs; i++ ) { glyph_metrics_t ci = boundingBox( glyphs[i] ); p->drawRect( x + ci.x + offsets[i].x, y + 100 + ci.y + offsets[i].y, ci.width, ci.height ); - qDebug("bounding ci[%d]=%d %d (%d/%d) / %d %d offs=(%d/%d) advance=(%d/%d)", i, ci.x, ci.y, ci.width, ci.height, + tqDebug("bounding ci[%d]=%d %d (%d/%d) / %d %d offs=(%d/%d) advance=(%d/%d)", i, ci.x, ci.y, ci.width, ci.height, ci.xoff, ci.yoff, offsets[i].x, offsets[i].y, advances[i].x, advances[i].y); x += advances[i].x; @@ -1505,10 +1505,10 @@ QFontEngineXft::QFontEngineXft( XftFont *font, XftPattern *pattern, int cmap ) // Xft maps Unicode and adobe roman for us. for (int i = 0; i < _face->num_charmaps; ++i) { FT_CharMap cm = _face->charmaps[i]; -// qDebug("font has charmap %x", cm->encoding); +// tqDebug("font has charmap %x", cm->encoding); if (cm->encoding == ft_encoding_adobe_custom || cm->encoding == ft_encoding_symbol) { -// qDebug("font has adobe custom or ms symbol charmap"); +// tqDebug("font has adobe custom or ms symbol charmap"); _cmap = i; break; } @@ -1855,13 +1855,13 @@ void QFontEngineXft::draw( QPainter *p, int x, int y, const QTextEngine *engine, col.color.alpha = 0xffff; col.pixel = pen.pixel(); #ifdef FONTENGINE_DEBUG - qDebug("===== drawing %d glyphs reverse=%s ======", si->num_glyphs, si->analysis.bidiLevel % 2?"TRUE":"FALSE" ); + tqDebug("===== drawing %d glyphs reverse=%s ======", si->num_glyphs, si->analysis.bidiLevel % 2?"TRUE":"FALSE" ); p->save(); p->setBrush( Qt::white ); glyph_metrics_t ci = boundingBox( glyphs, advances, offsets, si->num_glyphs ); p->drawRect( x + ci.x, y + ci.y, ci.width, ci.height ); p->drawRect( x + ci.x, y + 100 + ci.y, ci.width, ci.height ); - qDebug("bounding rect=%d %d (%d/%d)", ci.x, ci.y, ci.width, ci.height ); + tqDebug("bounding rect=%d %d (%d/%d)", ci.x, ci.y, ci.width, ci.height ); p->restore(); int yp = y; int xp = x; @@ -1895,7 +1895,7 @@ void QFontEngineXft::draw( QPainter *p, int x, int y, const QTextEngine *engine, p->drawRect( x+offsets[i].x+gi.x, y+offsets[i].y+100+gi.y, gi.width, gi.height ); p->drawLine( x+offsets[i].x, y + 150 + 5*i , x+offsets[i].x+advances[i], y + 150 + 5*i ); p->drawLine( x+offsets[i].x, y + 152 + 5*i , x+offsets[i].x+gi.xoff, y + 152 + 5*i ); - qDebug("bounding ci[%d]=%d %d (%d/%d) / %d %d offs=(%d/%d) advance=%d", i, gi.x, gi.y, gi.width, gi.height, + tqDebug("bounding ci[%d]=%d %d (%d/%d) / %d %d offs=(%d/%d) advance=%d", i, gi.x, gi.y, gi.width, gi.height, gi.xoff, gi.yoff, offsets[i].x, offsets[i].y, advances[i]); #endif x += advances[i]; @@ -1915,7 +1915,7 @@ void QFontEngineXft::draw( QPainter *p, int x, int y, const QTextEngine *engine, if (!glyphAttributes[i].zeroWidth && xp < SHRT_MAX && xp > SHRT_MIN) XftDrawString16( draw, &col, fnt, xp, yp, (XftChar16 *) (glyphs+i), 1 ); #endif // QT_XFT2 - // qDebug("advance = %d/%d", adv.x, adv.y ); + // tqDebug("advance = %d/%d", adv.x, adv.y ); x += advances[i]; i++; } @@ -1980,7 +1980,7 @@ void QFontEngineXft::draw( QPainter *p, int x, int y, const QTextEngine *engine, for ( int i = 0; i < si->num_glyphs; i++ ) { glyph_metrics_t ci = boundingBox( glyphs[i] ); p->drawRect( x + ci.x + offsets[i].x, y + 100 + ci.y + offsets[i].y, ci.width, ci.height ); - qDebug("bounding ci[%d]=%d %d (%d/%d) / %d %d offs=(%d/%d) advance=%d", i, ci.x, ci.y, ci.width, ci.height, + tqDebug("bounding ci[%d]=%d %d (%d/%d) / %d %d offs=(%d/%d) advance=%d", i, ci.x, ci.y, ci.width, ci.height, ci.xoff, ci.yoff, offsets[i].x, offsets[i].y, advances[i]); x += advances[i]; } @@ -2208,7 +2208,7 @@ bool QFontEngineXft::canRender( const QChar *string, int len ) QOpenType *QFontEngineXft::openType() const { -// qDebug("openTypeIface requested!"); +// tqDebug("openTypeIface requested!"); if ( _openType ) return _openType; @@ -2390,7 +2390,7 @@ QOpenType::QOpenType(QFontEngineXft *fe) FT_Error error; if ((error = TT_Load_GDEF_Table(face, &gdef))) { #ifdef OT_DEBUG - qDebug("error loading gdef table: %d", error); + tqDebug("error loading gdef table: %d", error); #endif gdef = 0; } @@ -2399,9 +2399,9 @@ QOpenType::QOpenType(QFontEngineXft *fe) gsub = 0; #ifdef OT_DEBUG if (error != FT_Err_Table_Missing) { - qDebug("error loading gsub table: %d", error); + tqDebug("error loading gsub table: %d", error); } else { - qDebug("face doesn't have a gsub table"); + tqDebug("face doesn't have a gsub table"); } #endif } @@ -2409,7 +2409,7 @@ QOpenType::QOpenType(QFontEngineXft *fe) if ((error = TT_Load_GPOS_Table(face, &gpos, gdef))) { gpos = 0; #ifdef OT_DEBUG - qDebug("error loading gpos table: %d", error); + tqDebug("error loading gpos table: %d", error); #endif } @@ -2448,7 +2448,7 @@ bool QOpenType::checkScript(unsigned int script) FT_Error error = TT_GSUB_Select_Script(gsub, tag, &script_index); if (error) { #ifdef OT_DEBUG - qDebug("could not select script %d in GSub table: %d", (int)script, error); + tqDebug("could not select script %d in GSub table: %d", (int)script, error); #endif return FALSE; } @@ -2462,7 +2462,7 @@ bool QOpenType::checkScript(unsigned int script) FT_Error error = TT_GPOS_Select_Script(gpos, script, &script_index); if (error) { #ifdef OT_DEBUG - qDebug("could not select script in gpos table: %d", error); + tqDebug("could not select script in gpos table: %d", error); #endif return FALSE; } @@ -2486,10 +2486,10 @@ void QOpenType::selectScript(unsigned int script, const Features *features) { TTO_FeatureList featurelist = gsub->FeatureList; int numfeatures = featurelist.FeatureCount; - qDebug("gsub table has %d features", numfeatures); + tqDebug("gsub table has %d features", numfeatures); for(int i = 0; i < numfeatures; i++) { TTO_FeatureRecord *r = featurelist.FeatureRecord + i; - qDebug(" feature '%s'", tag_to_string(r->FeatureTag)); + tqDebug(" feature '%s'", tag_to_string(r->FeatureTag)); } } #endif @@ -2498,14 +2498,14 @@ void QOpenType::selectScript(unsigned int script, const Features *features) FT_Error error = TT_GSUB_Select_Script(gsub, tag, &script_index); if (!error) { #ifdef OT_DEBUG - qDebug("script %s has script index %d", tag_to_string(script), script_index); + tqDebug("script %s has script index %d", tag_to_string(script), script_index); #endif while (features->tag) { FT_UShort feature_index; error = TT_GSUB_Select_Feature(gsub, features->tag, script_index, 0xffff, &feature_index); if (!error) { #ifdef OT_DEBUG - qDebug(" adding feature %s", tag_to_string(features->tag)); + tqDebug(" adding feature %s", tag_to_string(features->tag)); #endif TT_GSUB_Add_Feature(gsub, feature_index, features->property); } @@ -2523,12 +2523,12 @@ void QOpenType::selectScript(unsigned int script, const Features *features) { TTO_FeatureList featurelist = gpos->FeatureList; int numfeatures = featurelist.FeatureCount; - qDebug("gpos table has %d features", numfeatures); + tqDebug("gpos table has %d features", numfeatures); for(int i = 0; i < numfeatures; i++) { TTO_FeatureRecord *r = featurelist.FeatureRecord + i; FT_UShort feature_index; TT_GPOS_Select_Feature(gpos, r->FeatureTag, script_index, 0xffff, &feature_index); - qDebug(" feature '%s'", tag_to_string(r->FeatureTag)); + tqDebug(" feature '%s'", tag_to_string(r->FeatureTag)); } } #endif @@ -2553,7 +2553,7 @@ void QOpenType::selectScript(unsigned int script, const Features *features) static void dump_string(OTL_Buffer buffer) { for (uint i = 0; i < buffer->in_length; ++i) { - qDebug(" %x: cluster=%d", buffer->in_string[i].gindex, buffer->in_string[i].cluster); + tqDebug(" %x: cluster=%d", buffer->in_string[i].gindex, buffer->in_string[i].cluster); } } #endif @@ -2575,13 +2575,13 @@ bool QOpenType::shape(QShaperItem *item, const unsigned int *properties) } #ifdef OT_DEBUG - qDebug("-----------------------------------------"); -// qDebug("log clusters before shaping:"); + tqDebug("-----------------------------------------"); +// tqDebug("log clusters before shaping:"); // for (int j = 0; j < length; j++) -// qDebug(" log[%d] = %d", j, item->log_clusters[j]); - qDebug("original glyphs: %p", item->glyphs); +// tqDebug(" log[%d] = %d", j, item->log_clusters[j]); + tqDebug("original glyphs: %p", item->glyphs); for (int i = 0; i < length; ++i) - qDebug(" glyph=%4x", otl_buffer->in_string[i].gindex); + tqDebug(" glyph=%4x", otl_buffer->in_string[i].gindex); // dump_string(otl_buffer); #endif @@ -2594,13 +2594,13 @@ bool QOpenType::shape(QShaperItem *item, const unsigned int *properties) } #ifdef OT_DEBUG -// qDebug("log clusters before shaping:"); +// tqDebug("log clusters before shaping:"); // for (int j = 0; j < length; j++) -// qDebug(" log[%d] = %d", j, item->log_clusters[j]); - qDebug("shaped glyphs:"); +// tqDebug(" log[%d] = %d", j, item->log_clusters[j]); + tqDebug("shaped glyphs:"); for (int i = 0; i < length; ++i) - qDebug(" glyph=%4x", otl_buffer->in_string[i].gindex); - qDebug("-----------------------------------------"); + tqDebug(" glyph=%4x", otl_buffer->in_string[i].gindex); + tqDebug("-----------------------------------------"); // dump_string(otl_buffer); #endif @@ -2643,7 +2643,7 @@ bool QOpenType::positionAndAdd(QShaperItem *item, bool doLogClusters) int oldCi = 0; for (unsigned int i = 0; i < otl_buffer->in_length; ++i) { int ci = otl_buffer->in_string[i].cluster; - // qDebug(" ci[%d] = %d mark=%d, cmb=%d, cs=%d", + // tqDebug(" ci[%d] = %d mark=%d, cmb=%d, cs=%d", // i, ci, glyphAttributes[i].mark, glyphAttributes[i].combiningClass, glyphAttributes[i].clusterStart); if (!item->attributes[i].mark && item->attributes[i].clusterStart && ci != oldCi) { for (int j = oldCi; j < ci; j++) @@ -2657,7 +2657,7 @@ bool QOpenType::positionAndAdd(QShaperItem *item, bool doLogClusters) } // calulate the advances for the shaped glyphs -// qDebug("unpositioned: "); +// tqDebug("unpositioned: "); static_cast(item->font)->recalcAdvances(item->num_glyphs, item->glyphs, item->advances); // positioning code: @@ -2665,9 +2665,9 @@ bool QOpenType::positionAndAdd(QShaperItem *item, bool doLogClusters) float scale = item->font->scale(); OTL_Position positions = otl_buffer->positions; -// qDebug("positioned glyphs:"); +// tqDebug("positioned glyphs:"); for (unsigned int i = 0; i < otl_buffer->in_length; i++) { -// qDebug(" %d:\t orig advance: (%d/%d)\tadv=(%d/%d)\tpos=(%d/%d)\tback=%d\tnew_advance=%d", i, +// tqDebug(" %d:\t orig advance: (%d/%d)\tadv=(%d/%d)\tpos=(%d/%d)\tback=%d\tnew_advance=%d", i, // glyphs[i].advance.x.toInt(), glyphs[i].advance.y.toInt(), // (int)(positions[i].x_advance >> 6), (int)(positions[i].y_advance >> 6), // (int)(positions[i].x_pos >> 6), (int)(positions[i].y_pos >> 6), @@ -2695,7 +2695,7 @@ bool QOpenType::positionAndAdd(QShaperItem *item, bool doLogClusters) --back; } } -// qDebug(" ->\tadv=%d\tpos=(%d/%d)", +// tqDebug(" ->\tadv=%d\tpos=(%d/%d)", // glyphs[i].advance.x.toInt(), glyphs[i].offset.x.toInt(), glyphs[i].offset.y.toInt()); } item->has_positioning = TRUE; @@ -2705,18 +2705,18 @@ bool QOpenType::positionAndAdd(QShaperItem *item, bool doLogClusters) #ifdef OT_DEBUG // if (doLogClusters) { -// qDebug("log clusters after shaping:"); +// tqDebug("log clusters after shaping:"); // for (int j = 0; j < length; j++) -// qDebug(" log[%d] = %d", j, item->log_clusters[j]); +// tqDebug(" log[%d] = %d", j, item->log_clusters[j]); // } - qDebug("final glyphs:"); + tqDebug("final glyphs:"); for (int i = 0; i < (int)otl_buffer->in_length; ++i) - qDebug(" glyph=%4x char_index=%d mark: %d cmp: %d, clusterStart: %d advance=%d offset=%d/%d", + tqDebug(" glyph=%4x char_index=%d mark: %d cmp: %d, clusterStart: %d advance=%d offset=%d/%d", item->glyphs[i], otl_buffer->in_string[i].cluster, item->attributes[i].mark, item->attributes[i].combiningClass, item->attributes[i].clusterStart, item->advances[i], item->offsets[i].x, item->offsets[i].y); - qDebug("-----------------------------------------"); + tqDebug("-----------------------------------------"); #endif return TRUE; } -- cgit v1.2.1