diff options
Diffstat (limited to 'src/kernel/tqfont.cpp')
| -rw-r--r-- | src/kernel/tqfont.cpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/src/kernel/tqfont.cpp b/src/kernel/tqfont.cpp index c8395d342..5dce75b20 100644 --- a/src/kernel/tqfont.cpp +++ b/src/kernel/tqfont.cpp @@ -65,7 +65,7 @@ #ifdef TQFONTCACHE_DEBUG # define FC_DEBUG tqDebug #else -# define FC_DEBUG if (FALSE) tqDebug +# define FC_DEBUG if (false) tqDebug #endif @@ -93,21 +93,21 @@ bool TQFontDef::operator==( const TQFontDef &other ) const */ if (pixelSize != -1 && other.pixelSize != -1) { if (pixelSize != other.pixelSize) - return FALSE; + return false; } else if (pointSize != -1 && other.pointSize != -1) { if (pointSize != other.pointSize && (TQABS(pointSize - other.pointSize) >= 5 || tqRound(pointSize/10.) != tqRound(other.pointSize/10.))) - return FALSE; + return false; } else { - return FALSE; + return false; } if (!ignorePitch && !other.ignorePitch && fixedPitch != other.fixedPitch) - return FALSE; + return false; if (stretch != 0 && other.stretch != 0 && stretch != other.stretch) - return FALSE; + return false; TQString this_family, this_foundry, other_family, other_foundry; TQFontDatabase::parseFontName(family, this_foundry, this_family); @@ -132,7 +132,7 @@ bool TQFontDef::operator==( const TQFontDef &other ) const TQFontPrivate::TQFontPrivate() : engineData( 0 ), paintdevice( 0 ), - rawMode( FALSE ), underline( FALSE ), overline( FALSE ), strikeOut( FALSE ), + rawMode( false ), underline( false ), overline( false ), strikeOut( false ), mask( 0 ) { #ifdef TQ_WS_X11 @@ -250,7 +250,7 @@ TQFontEngineData::~TQFontEngineData() attributes, or if no matching font exists, TQt will use the closest matching installed font. The attributes of the font that is actually used are retrievable from a TQFontInfo object. If the - window system provides an exact match exactMatch() returns TRUE. + window system provides an exact match exactMatch() returns true. Use TQFontMetrics to get measurements, e.g. the pixel length of a string using TQFontMetrics::width(). @@ -831,7 +831,7 @@ void TQFont::setPixelSizeFloat( float pixelSize ) } /*! - Returns TRUE if italic has been set; otherwise returns FALSE. + Returns true if italic has been set; otherwise returns false. \sa setItalic() */ @@ -841,7 +841,7 @@ bool TQFont::italic() const } /*! - If \a enable is TRUE, italic is set on; otherwise italic is set + If \a enable is true, italic is set on; otherwise italic is set off. \sa italic(), TQFontInfo @@ -907,8 +907,8 @@ void TQFont::setWeight( int weight ) /*! \fn bool TQFont::bold() const - Returns TRUE if weight() is a value greater than \link Weight - TQFont::Normal \endlink; otherwise returns FALSE. + Returns true if weight() is a value greater than \link Weight + TQFont::Normal \endlink; otherwise returns false. \sa weight(), setBold(), TQFontInfo::bold() */ @@ -926,7 +926,7 @@ void TQFont::setWeight( int weight ) */ /*! - Returns TRUE if underline has been set; otherwise returns FALSE. + Returns true if underline has been set; otherwise returns false. \sa setUnderline() */ @@ -936,7 +936,7 @@ bool TQFont::underline() const } /*! - If \a enable is TRUE, sets underline on; otherwise sets underline + If \a enable is true, sets underline on; otherwise sets underline off. \sa underline(), TQFontInfo @@ -950,7 +950,7 @@ void TQFont::setUnderline( bool enable ) } /*! - Returns TRUE if overline has been set; otherwise returns FALSE. + Returns true if overline has been set; otherwise returns false. \sa setOverline() */ @@ -960,7 +960,7 @@ bool TQFont::overline() const } /*! - If \a enable is TRUE, sets overline on; otherwise sets overline off. + If \a enable is true, sets overline on; otherwise sets overline off. \sa overline(), TQFontInfo */ @@ -973,7 +973,7 @@ void TQFont::setOverline( bool enable ) } /*! - Returns TRUE if strikeout has been set; otherwise returns FALSE. + Returns true if strikeout has been set; otherwise returns false. \sa setStrikeOut() */ @@ -983,7 +983,7 @@ bool TQFont::strikeOut() const } /*! - If \a enable is TRUE, sets strikeout on; otherwise sets strikeout + If \a enable is true, sets strikeout on; otherwise sets strikeout off. \sa strikeOut(), TQFontInfo @@ -997,7 +997,7 @@ void TQFont::setStrikeOut( bool enable ) } /*! - Returns TRUE if fixed pitch has been set; otherwise returns FALSE. + Returns true if fixed pitch has been set; otherwise returns false. \sa setFixedPitch(), TQFontInfo::fixedPitch() */ @@ -1007,7 +1007,7 @@ bool TQFont::fixedPitch() const } /*! - If \a enable is TRUE, sets fixed pitch on; otherwise sets fixed + If \a enable is true, sets fixed pitch on; otherwise sets fixed pitch off. \sa fixedPitch(), TQFontInfo @@ -1017,7 +1017,7 @@ void TQFont::setFixedPitch( bool enable ) detach(); d->request.fixedPitch = enable; - d->request.ignorePitch = FALSE; + d->request.ignorePitch = false; d->mask |= TQFontPrivate::FixedPitch; } @@ -1220,7 +1220,7 @@ void TQFont::setStretch( int factor ) } /*! - If \a enable is TRUE, turns raw mode on; otherwise turns raw mode + If \a enable is true, turns raw mode on; otherwise turns raw mode off. This function only has an effect under X11. If raw mode is enabled, TQt will search for an X font with a @@ -1246,7 +1246,7 @@ void TQFont::setRawMode( bool enable ) } /*! - Returns TRUE if a window system font exactly matching the settings + Returns true if a window system font exactly matching the settings of this font is available. \sa TQFontInfo @@ -1263,8 +1263,8 @@ bool TQFont::exactMatch() const } /*! - Returns TRUE if this font is equal to \a f; otherwise returns - FALSE. + Returns true if this font is equal to \a f; otherwise returns + false. Two TQFonts are considered equal if their font attributes are equal. If rawMode() is enabled for both fonts, only the family @@ -1281,8 +1281,8 @@ bool TQFont::operator==( const TQFont &f ) const } /*! - Returns TRUE if this font is different from \a f; otherwise - returns FALSE. + Returns true if this font is different from \a f; otherwise + returns false. Two TQFonts are considered to be different if their font attributes are different. If rawMode() is enabled for both fonts, only the @@ -1296,7 +1296,7 @@ bool TQFont::operator!=( const TQFont &f ) const } /*! - Returns TRUE if this font and \a f are copies of each other, i.e. + Returns true if this font and \a f are copies of each other, i.e. one of them was created as a copy of the other and neither has been modified since. This is much stricter than equality. @@ -1308,8 +1308,8 @@ bool TQFont::isCopyOf( const TQFont & f ) const } /*! - Returns TRUE if raw mode is used for font name matching; otherwise - returns FALSE. + Returns true if raw mode is used for font name matching; otherwise + returns false. \sa setRawMode() rawName() */ @@ -1402,9 +1402,9 @@ static void initFontSubst() if (fontSubst) return; - fontSubst = new TQFontSubst(17, FALSE); + fontSubst = new TQFontSubst(17, false); TQ_CHECK_PTR( fontSubst ); - fontSubst->setAutoDelete( TRUE ); + fontSubst->setAutoDelete( true ); tqfont_cleanup_fontsubst.set(&fontSubst); for ( int i=0; initTbl[i] != 0; i += 2 ) @@ -1662,7 +1662,7 @@ bool TQFont::fromString(const TQString &descrip) descrip.isEmpty() ? "(empty)" : descrip.latin1()); #endif - return FALSE; + return false; } setFamily(l[0]); @@ -1688,7 +1688,7 @@ bool TQFont::fromString(const TQString &descrip) setRawMode(l[9].toInt()); } - return TRUE; + return true; } /*! \internal @@ -2137,8 +2137,8 @@ int TQFontMetrics::maxWidth() const } /*! - Returns TRUE if character \a ch is a valid character in the font; - otherwise returns FALSE. + Returns true if character \a ch is a valid character in the font; + otherwise returns false. */ bool TQFontMetrics::inFont(TQChar ch) const { @@ -2150,7 +2150,7 @@ bool TQFontMetrics::inFont(TQChar ch) const Q_ASSERT( engine != 0 ); #endif // QT_CHECK_STATE - if ( engine->type() == TQFontEngine::Box ) return FALSE; + if ( engine->type() == TQFontEngine::Box ) return false; return engine->canRender( &ch, 1 ); } @@ -2181,7 +2181,7 @@ int TQFontMetrics::leftBearing(TQChar ch) const glyph_t glyphs[10]; int nglyphs = 9; - engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE ); + engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false ); // ### can nglyphs != 1 happen at all? Not currently I think glyph_metrics_t gi = engine->boundingBox( glyphs[0] ); return gi.x; @@ -2215,7 +2215,7 @@ int TQFontMetrics::rightBearing(TQChar ch) const glyph_t glyphs[10]; int nglyphs = 9; - engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE ); + engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false ); // ### can nglyphs != 1 happen at all? Not currently I think glyph_metrics_t gi = engine->boundingBox( glyphs[0] ); return gi.xoff - gi.x - gi.width; @@ -2266,7 +2266,7 @@ int TQFontMetrics::width( const TQString &str, int len ) const glyph_t glyphs[8]; advance_t advances[8]; int nglyphs = 7; - engine->stringToCMap( ch, 1, glyphs, advances, &nglyphs, FALSE ); + engine->stringToCMap( ch, 1, glyphs, advances, &nglyphs, false ); // ### can nglyphs != 1 happen at all? Not currently I think if ( uc < TQFontEngineData::widthCacheSize && advances[0] > 0 && advances[0] < 0x100 ) @@ -2395,7 +2395,7 @@ TQRect TQFontMetrics::boundingRect( TQChar ch ) const glyph_t glyphs[10]; int nglyphs = 9; - engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE ); + engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false ); glyph_metrics_t gi = engine->boundingBox( glyphs[0] ); return TQRect( gi.x, gi.y, gi.width, gi.height ); } @@ -2790,8 +2790,8 @@ int TQFontInfo::weight() const /*! \fn bool TQFontInfo::bold() const - Returns TRUE if weight() would return a value greater than \c - TQFont::Normal; otherwise returns FALSE. + Returns true if weight() would return a value greater than \c + TQFont::Normal; otherwise returns false. \sa weight(), TQFont::bold() */ @@ -2856,9 +2856,9 @@ bool TQFontInfo::fixedPitch() const glyph_t g[2]; int l = 2; advance_t a[2]; - engine->stringToCMap(ch, 2, g, a, &l, FALSE); + engine->stringToCMap(ch, 2, g, a, &l, false); engine->fontDef.fixedPitch = a[0] == a[1]; - engine->fontDef.fixedPitchComputed = TRUE; + engine->fontDef.fixedPitchComputed = true; } #endif return engine->fontDef.fixedPitch; @@ -2881,8 +2881,8 @@ TQFont::StyleHint TQFontInfo::styleHint() const } /*! - Returns TRUE if the font is a raw mode font; otherwise returns - FALSE. + Returns true if the font is a raw mode font; otherwise returns + false. If it is a raw mode font, all other functions in TQFontInfo will return the same values set in the TQFont, regardless of the font @@ -2896,8 +2896,8 @@ bool TQFontInfo::rawMode() const } /*! - Returns TRUE if the matched window system font is exactly the same - as the one specified by the font; otherwise returns FALSE. + Returns true if the matched window system font is exactly the same + as the one specified by the font; otherwise returns false. \sa TQFont::exactMatch() */ @@ -2936,7 +2936,7 @@ static TQSingleCleanupHandler<TQFontCache> cleanup_fontcache; TQFontCache::TQFontCache() : TQObject( tqApp, "global font cache" ), total_cost( 0 ), max_cost( min_cost ), - current_timestamp( 0 ), fast( FALSE ), timer_id( -1 ) + current_timestamp( 0 ), fast( false ), timer_id( -1 ) { Q_ASSERT( instance == 0 ); instance = this; @@ -3048,7 +3048,7 @@ void TQFontCache::increaseCost( uint cost ) if (timer_id != -1) killTimer( timer_id ); timer_id = startTimer( fast_timeout ); - fast = TRUE; + fast = true; } } } @@ -3145,7 +3145,7 @@ void TQFontCache::timerEvent( TQTimerEvent * ) killTimer( timer_id ); timer_id = -1; - fast = FALSE; + fast = false; return; } @@ -3220,7 +3220,7 @@ void TQFontCache::timerEvent( TQTimerEvent * ) killTimer( timer_id ); timer_id = startTimer( slow_timeout ); - fast = FALSE; + fast = false; } return; @@ -3229,7 +3229,7 @@ void TQFontCache::timerEvent( TQTimerEvent * ) killTimer( timer_id ); timer_id = startTimer( fast_timeout ); - fast = TRUE; + fast = true; } max_cost = new_max_cost; |
