diff options
Diffstat (limited to 'src/kernel/tqfontdatabase.cpp')
| -rw-r--r-- | src/kernel/tqfontdatabase.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/src/kernel/tqfontdatabase.cpp b/src/kernel/tqfontdatabase.cpp index bda119a03..26a2c00c0 100644 --- a/src/kernel/tqfontdatabase.cpp +++ b/src/kernel/tqfontdatabase.cpp @@ -59,14 +59,14 @@ #ifdef TQFONTDATABASE_DEBUG # define FD_DEBUG tqDebug #else -# define FD_DEBUG if (FALSE) tqDebug +# define FD_DEBUG if (false) tqDebug #endif //#define FONT_MATCH_DEBUG #ifdef FONT_MATCH_DEBUG # define FM_DEBUG tqDebug #else -# define FM_DEBUG if (FALSE) tqDebug +# define FM_DEBUG if (false) tqDebug #endif #if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) @@ -144,7 +144,7 @@ struct TQtFontSize int count; TQtFontEncoding *encodings; TQtFontEncoding *encodingID( int id, uint xpoint = 0, uint xres = 0, - uint yres = 0, uint avgwidth = 0, bool add = FALSE); + uint yres = 0, uint avgwidth = 0, bool add = false); #endif // TQ_WS_X11 }; @@ -179,7 +179,7 @@ struct TQtFontStyle { struct Key { Key( const TQString &styleString ); - Key() : italic( FALSE ), oblique( FALSE ), + Key() : italic( false ), oblique( false ), weight( TQFont::Normal ), stretch( 0 ) { } Key( const Key &o ) : italic( o.italic ), oblique( o.oblique ), weight( o.weight ), stretch( o.stretch ) { } @@ -205,8 +205,8 @@ struct TQtFontStyle }; TQtFontStyle( const Key &k ) - : key( k ), bitmapScalable( FALSE ), smoothScalable( FALSE ), - fakeOblique( FALSE ), count( 0 ), pixelSizes( 0 ) + : key( k ), bitmapScalable( false ), smoothScalable( false ), + fakeOblique( false ), count( 0 ), pixelSizes( 0 ) { #if defined(TQ_WS_X11) weightName = setwidthName = 0; @@ -235,18 +235,18 @@ struct TQtFontStyle const char *setwidthName; #endif // TQ_WS_X11 - TQtFontSize *pixelSize( unsigned short size, bool = FALSE ); + TQtFontSize *pixelSize( unsigned short size, bool = false ); }; TQtFontStyle::Key::Key( const TQString &styleString ) - : italic( FALSE ), oblique( FALSE ), weight( TQFont::Normal ), stretch( 0 ) + : italic( false ), oblique( false ), weight( TQFont::Normal ), stretch( 0 ) { weight = getFontWeight( styleString ); if ( styleString.contains( "Italic" ) ) - italic = TRUE; + italic = true; else if ( styleString.contains( "Oblique" ) ) - oblique = TRUE; + oblique = true; } TQtFontSize *TQtFontStyle::pixelSize( unsigned short size, bool add ) @@ -283,7 +283,7 @@ struct TQtFontFoundry int count; TQtFontStyle **styles; - TQtFontStyle *style( const TQtFontStyle::Key &, bool = FALSE ); + TQtFontStyle *style( const TQtFontStyle::Key &, bool = false ); }; TQtFontStyle *TQtFontFoundry::style( const TQtFontStyle::Key &key, bool create ) @@ -327,17 +327,17 @@ struct TQtFontFamily TQtFontFamily(const TQString &n ) : #ifdef TQ_WS_X11 - fixedPitch( TRUE ), hasXft( FALSE ), xftScriptCheck( FALSE ), xlfdLoaded( FALSE ), synthetic(FALSE), + fixedPitch( true ), hasXft( false ), xftScriptCheck( false ), xlfdLoaded( false ), synthetic(false), #else - fixedPitch( FALSE ), + fixedPitch( false ), #endif #ifdef TQ_WS_WIN - scriptCheck( FALSE ), + scriptCheck( false ), #endif #if defined(Q_OS_MAC) - fixedPitchComputed(FALSE), + fixedPitchComputed(false), #endif - fullyLoaded( FALSE ), + fullyLoaded( false ), name( n ), count( 0 ), foundries( 0 ) { memset( scripts, 0, sizeof( scripts ) ); } @@ -378,7 +378,7 @@ struct TQtFontFamily unsigned char scripts[TQFont::LastPrivateScript]; - TQtFontFoundry *foundry( const TQString &f, bool = FALSE ); + TQtFontFoundry *foundry( const TQString &f, bool = false ); }; TQtFontFoundry *TQtFontFamily::foundry( const TQString &f, bool create ) @@ -410,7 +410,7 @@ public: delete families[count]; free( families ); } - TQtFontFamily *family( const TQString &f, bool = FALSE ); + TQtFontFamily *family( const TQString &f, bool = false ); int count; TQtFontFamily **families; @@ -611,7 +611,7 @@ static inline bool requiresOpenType(TQFont::Script s) static inline bool canRender( TQFontEngine *fe, TQFont::Script script ) { - if ( !fe ) return FALSE; + if ( !fe ) return false; bool hasChar = true; @@ -635,7 +635,7 @@ static inline bool canRender( TQFontEngine *fe, TQFont::Script script ) if (hasChar && requiresOpenType(script)) { TQOpenType *ot = fe->openType(); if (!ot || !ot->supportsScript(script)) - return FALSE; + return false; } #endif @@ -924,7 +924,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp, if ( fp->rawMode ) { fe = loadEngine( script, fp, request, 0, 0, 0 #ifdef TQ_WS_X11 - , 0, 0, FALSE + , 0, 0, false #endif ); @@ -995,7 +995,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp, script, scriptName( script ).latin1(), request.weight, request.italic, request.stretch, request.pixelSize, pitch ); - bool usesFontConfig = FALSE; + bool usesFontConfig = false; if (family_name.isEmpty() || family_name == "Sans Serif" || family_name == "Serif" @@ -1168,7 +1168,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp, fe->fontDef.italic = best_style->key.italic || best_style->key.oblique; fe->fontDef.fixedPitch = best_family->fixedPitch; fe->fontDef.stretch = best_style->key.stretch; - fe->fontDef.ignorePitch = FALSE; + fe->fontDef.ignorePitch = false; } } @@ -1282,7 +1282,7 @@ static TQString styleString( int weight, bool italic, bool oblique ) TQString TQFontDatabase::styleString( const TQFont &f ) { // ### fix oblique here - return ::styleString( f.weight(), f.italic(), FALSE ); + return ::styleString( f.weight(), f.italic(), false ); } @@ -1544,7 +1544,7 @@ TQStringList TQFontDatabase::styles( const TQString &family ) const for ( int k = 0; k < foundry->count; k++ ) { TQtFontStyle::Key ke( foundry->styles[k]->key ); ke.stretch = 0; - allStyles.style( ke, TRUE ); + allStyles.style( ke, true ); } } } @@ -1557,8 +1557,8 @@ TQStringList TQFontDatabase::styles( const TQString &family ) const } /*! - Returns TRUE if the font that has family \a family and style \a - style is fixed pitch; otherwise returns FALSE. + Returns true if the font that has family \a family and style \a + style is fixed pitch; otherwise returns false. */ bool TQFontDatabase::isFixedPitch(const TQString &family, @@ -1577,7 +1577,7 @@ bool TQFontDatabase::isFixedPitch(const TQString &family, if (!f->fixedPitchComputed) { TQFontMetrics fm(familyName); f->fixedPitch = fm.width('i') == fm.width('m'); - f->fixedPitchComputed = TRUE; + f->fixedPitchComputed = true; } } #endif @@ -1586,8 +1586,8 @@ bool TQFontDatabase::isFixedPitch(const TQString &family, } /*! - Returns TRUE if the font that has family \a family and style \a - style is a scalable bitmap font; otherwise returns FALSE. Scaling + Returns true if the font that has family \a family and style \a + style is a scalable bitmap font; otherwise returns false. Scaling a bitmap font usually produces an unattractive hardly readable result, because the pixels of the font are scaled. If you need to scale a bitmap font it is better to scale it to one of the fixed @@ -1598,7 +1598,7 @@ bool TQFontDatabase::isFixedPitch(const TQString &family, bool TQFontDatabase::isBitmapScalable( const TQString &family, const TQString &style) const { - bool bitmapScalable = FALSE; + bool bitmapScalable = false; TQString familyName, foundryName; parseFontName( family, foundryName, familyName ); @@ -1615,7 +1615,7 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family, for ( int k = 0; k < foundry->count; k++ ) if ((style.isEmpty() || foundry->styles[k]->key == styleKey) && foundry->styles[k]->bitmapScalable && !foundry->styles[k]->smoothScalable) { - bitmapScalable = TRUE; + bitmapScalable = true; goto end; } } @@ -1626,9 +1626,9 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family, /*! - Returns TRUE if the font that has family \a family and style \a - style is smoothly scalable; otherwise returns FALSE. If this - function returns TRUE, it's safe to scale this font to any size, + Returns true if the font that has family \a family and style \a + style is smoothly scalable; otherwise returns false. If this + function returns true, it's safe to scale this font to any size, and the result will always look attractive. \sa isScalable(), isBitmapScalable() @@ -1636,7 +1636,7 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family, bool TQFontDatabase::isSmoothlyScalable( const TQString &family, const TQString &style) const { - bool smoothScalable = FALSE; + bool smoothScalable = false; TQString familyName, foundryName; parseFontName( family, foundryName, familyName ); @@ -1652,7 +1652,7 @@ bool TQFontDatabase::isSmoothlyScalable( const TQString &family, if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) { for ( int k = 0; k < foundry->count; k++ ) if ((style.isEmpty() || foundry->styles[k]->key == styleKey) && foundry->styles[k]->smoothScalable) { - smoothScalable = TRUE; + smoothScalable = true; goto end; } } @@ -1662,8 +1662,8 @@ bool TQFontDatabase::isSmoothlyScalable( const TQString &family, } /*! - Returns TRUE if the font that has family \a family and style \a - style is scalable; otherwise returns FALSE. + Returns true if the font that has family \a family and style \a + style is scalable; otherwise returns false. \sa isBitmapScalable(), isSmoothlyScalable() */ @@ -1671,7 +1671,7 @@ bool TQFontDatabase::isScalable( const TQString &family, const TQString &style) const { if ( isSmoothlyScalable( family, style) ) - return TRUE; + return true; return isBitmapScalable( family, style); } @@ -1692,7 +1692,7 @@ TQValueList<int> TQFontDatabase::pointSizes( const TQString &family, Q_UNUSED( style ); return standardSizes(); #else - bool smoothScalable = FALSE; + bool smoothScalable = false; TQString familyName, foundryName; parseFontName( family, foundryName, familyName ); @@ -1712,7 +1712,7 @@ TQValueList<int> TQFontDatabase::pointSizes( const TQString &family, if ( !style ) continue; if ( style->smoothScalable ) { - smoothScalable = TRUE; + smoothScalable = true; goto end; } for ( int l = 0; l < style->count; l++ ) { @@ -1761,7 +1761,7 @@ TQFont TQFontDatabase::font( const TQString &family, const TQString &style, TQtFontFoundry *foundry = f->foundries[j]; if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) { for ( int k = 0; k < foundry->count; k++ ) - allStyles.style( foundry->styles[k]->key, TRUE ); + allStyles.style( foundry->styles[k]->key, true ); } } @@ -1771,7 +1771,7 @@ TQFont TQFontDatabase::font( const TQString &family, const TQString &style, if ( !s ) // no styles found? return TQApplication::font(); return TQFont( family, pointSize, s->key.weight, - s->key.italic ? TRUE : s->key.oblique ? TRUE : FALSE ); + s->key.italic ? true : s->key.oblique ); } @@ -1791,7 +1791,7 @@ TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family, Q_UNUSED( style ); return TQFontDatabase::standardSizes(); #else - bool smoothScalable = FALSE; + bool smoothScalable = false; TQString familyName, foundryName; parseFontName( family, foundryName, familyName ); @@ -1813,7 +1813,7 @@ TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family, if ( !style ) continue; if ( style->smoothScalable ) { - smoothScalable = TRUE; + smoothScalable = true; goto end; } for ( int l = 0; l < style->count; l++ ) { @@ -1858,8 +1858,8 @@ TQValueList<int> TQFontDatabase::standardSizes() /*! - Returns TRUE if the font that has family \a family and style \a - style is italic; otherwise returns FALSE. + Returns true if the font that has family \a family and style \a + style is italic; otherwise returns false. \sa weight(), bold() */ @@ -1873,13 +1873,13 @@ bool TQFontDatabase::italic( const TQString &family, TQtFontFoundry allStyles( foundryName ); TQtFontFamily *f = d->family( familyName ); - if ( !f ) return FALSE; + if ( !f ) return false; for ( int j = 0; j < f->count; j++ ) { TQtFontFoundry *foundry = f->foundries[j]; if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) { for ( int k = 0; k < foundry->count; k++ ) - allStyles.style( foundry->styles[k]->key, TRUE ); + allStyles.style( foundry->styles[k]->key, true ); } } @@ -1890,8 +1890,8 @@ bool TQFontDatabase::italic( const TQString &family, /*! - Returns TRUE if the font that has family \a family and style \a - style is bold; otherwise returns FALSE. + Returns true if the font that has family \a family and style \a + style is bold; otherwise returns false. \sa italic(), weight() */ @@ -1905,14 +1905,14 @@ bool TQFontDatabase::bold( const TQString &family, TQtFontFoundry allStyles( foundryName ); TQtFontFamily *f = d->family( familyName ); - if ( !f ) return FALSE; + if ( !f ) return false; for ( int j = 0; j < f->count; j++ ) { TQtFontFoundry *foundry = f->foundries[j]; if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) { for ( int k = 0; k < foundry->count; k++ ) - allStyles.style( foundry->styles[k]->key, TRUE ); + allStyles.style( foundry->styles[k]->key, true ); } } @@ -1946,7 +1946,7 @@ int TQFontDatabase::weight( const TQString &family, if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) { for ( int k = 0; k < foundry->count; k++ ) - allStyles.style( foundry->styles[k]->key, TRUE ); + allStyles.style( foundry->styles[k]->key, true ); } } |
