diff options
Diffstat (limited to 'src/kernel/qfontdatabase.cpp')
| -rw-r--r-- | src/kernel/qfontdatabase.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/src/kernel/qfontdatabase.cpp b/src/kernel/qfontdatabase.cpp index 83702d308..e67fbdc8e 100644 --- a/src/kernel/qfontdatabase.cpp +++ b/src/kernel/qfontdatabase.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) && !defined(TQWS) - 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 @@ -926,7 +926,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 ); @@ -997,7 +997,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" @@ -1170,7 +1170,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; } } @@ -1284,7 +1284,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 ); } @@ -1546,7 +1546,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 ); } } } @@ -1559,8 +1559,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, @@ -1579,7 +1579,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 @@ -1588,8 +1588,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 @@ -1600,7 +1600,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 ); @@ -1617,7 +1617,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; } } @@ -1628,9 +1628,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() @@ -1638,7 +1638,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 ); @@ -1654,7 +1654,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; } } @@ -1664,8 +1664,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() */ @@ -1673,7 +1673,7 @@ bool TQFontDatabase::isScalable( const TQString &family, const TQString &style) const { if ( isSmoothlyScalable( family, style) ) - return TRUE; + return true; return isBitmapScalable( family, style); } @@ -1694,7 +1694,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 ); @@ -1714,7 +1714,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++ ) { @@ -1763,7 +1763,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 ); } } @@ -1773,7 +1773,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 ); } @@ -1793,7 +1793,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 ); @@ -1815,7 +1815,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++ ) { @@ -1860,8 +1860,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() */ @@ -1875,13 +1875,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 ); } } @@ -1892,8 +1892,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() */ @@ -1907,14 +1907,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 ); } } @@ -1948,7 +1948,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 ); } } |
