diff options
Diffstat (limited to 'tqtinterface/qt4/src/kernel/tqfontdatabase.cpp')
-rw-r--r-- | tqtinterface/qt4/src/kernel/tqfontdatabase.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/tqtinterface/qt4/src/kernel/tqfontdatabase.cpp b/tqtinterface/qt4/src/kernel/tqfontdatabase.cpp index e70be03..219aa98 100644 --- a/tqtinterface/qt4/src/kernel/tqfontdatabase.cpp +++ b/tqtinterface/qt4/src/kernel/tqfontdatabase.cpp @@ -126,16 +126,16 @@ static int getFontWeight( const TQString &weightString ) if (s == "light") return TQFont::Light; - if (s.tqcontains("bold")) { - if (s.tqcontains("demi")) + if (s.contains("bold")) { + if (s.contains("demi")) return (int) TQFont::DemiBold; return (int) TQFont::Bold; } - if (s.tqcontains("light")) + if (s.contains("light")) return (int) TQFont::Light; - if (s.tqcontains("black")) + if (s.contains("black")) return (int) TQFont::Black; return (int) TQFont::Normal; @@ -261,9 +261,9 @@ TQtFontStyle::Key::Key( const TQString &styleString ) { weight = getFontWeight( styleString ); - if ( styleString.tqcontains( "Italic" ) ) + if ( styleString.contains( "Italic" ) ) italic = TRUE; - else if ( styleString.tqcontains( "Oblique" ) ) + else if ( styleString.contains( "Oblique" ) ) oblique = TRUE; } @@ -715,7 +715,7 @@ static TQtFontStyle *bestStyle(TQtFontFoundry *foundry, const TQtFontStyle::Key } #if defined(TQ_WS_X11) -static TQtFontEncoding *tqfindEncoding(TQFont::Script script, int styleStrategy, +static TQtFontEncoding *findEncoding(TQFont::Script script, int styleStrategy, TQtFontSize *size, int force_encoding_id) { TQtFontEncoding *encoding = 0; @@ -734,11 +734,11 @@ static TQtFontEncoding *tqfindEncoding(TQFont::Script script, int styleStrategy, if (encoding) return encoding; } - // Xft not available, tqfind an XLFD font, trying the default encoding first + // Xft not available, find an XLFD font, trying the default encoding first encoding = size->encodingID(TQFontPrivate::defaultEncodingID); if (!encoding || !scripts_for_xlfd_encoding[encoding->encoding][script]) { - // tqfind the first encoding that supports the requested script + // find the first encoding that supports the requested script encoding = 0; for (int x = 0; !encoding && x < size->count; ++x) { const int enc = size->encodings[x].encoding; @@ -821,13 +821,13 @@ unsigned int bestFoundry( TQFont::Script script, unsigned int score, int styleSt TQtFontEncoding *encoding = 0; #endif - // 4. tqfind closest size match + // 4. find closest size match if (! size) { unsigned int distance = ~0u; for (int x = 0; x < style->count; ++x) { #ifdef TQ_WS_X11 encoding = - tqfindEncoding(script, styleStrategy, style->pixelSizes + x, force_encoding_id); + findEncoding(script, styleStrategy, style->pixelSizes + x, force_encoding_id); if (!encoding) { FM_DEBUG(" size %3d does not support the script we want", style->pixelSizes[x].pixelSize); @@ -861,7 +861,7 @@ unsigned int bestFoundry( TQFont::Script script, unsigned int score, int styleSt #ifdef TQ_WS_X11 if (size) { - encoding = tqfindEncoding(script, styleStrategy, size, force_encoding_id); + encoding = findEncoding(script, styleStrategy, size, force_encoding_id); if (!encoding) size = 0; } if ( ! encoding ) { @@ -929,7 +929,7 @@ unsigned int bestFoundry( TQFont::Script script, unsigned int score, int styleSt \internal */ TQFontEngine * -TQFontDatabase::tqfindFont( TQFont::Script script, const TQFontPrivate *fp, +TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp, const TQFontDef &request, int force_encoding_id ) { #ifndef TQ_WS_X11 @@ -961,7 +961,7 @@ TQFontDatabase::tqfindFont( TQFont::Script script, const TQFontPrivate *fp, #endif fp->painttqdevice ); - fe = TQFontCache::instance->tqfindEngine( key ); + fe = TQFontCache::instance->findEngine( key ); if ( fe ) return fe; } @@ -988,13 +988,13 @@ TQFontDatabase::tqfindFont( TQFont::Script script, const TQFontPrivate *fp, static TQFont::Script defaultHan; TQCString locale = setlocale(LC_ALL, NULL); - if (locale.tqcontains("ko")) + if (locale.contains("ko")) defaultHan = TQFont::Han_Korean; - else if (locale.tqcontains("zh_TW") || locale.tqcontains("zh_HK")) + else if (locale.contains("zh_TW") || locale.contains("zh_HK")) defaultHan = TQFont::Han_TraditionalChinese; - else if (locale.tqcontains("zh")) + else if (locale.contains("zh")) defaultHan = TQFont::Han_SimplifiedChinese; - else if (locale.tqcontains("ja")) + else if (locale.contains("ja")) defaultHan = TQFont::Han_Japanese; else defaultHan = TQFont::Han; // don't change @@ -1003,7 +1003,7 @@ TQFontDatabase::tqfindFont( TQFont::Script script, const TQFontPrivate *fp, } #endif - FM_DEBUG( "TQFontDatabase::tqfindFont\n" + FM_DEBUG( "TQFontDatabase::findFont\n" " request:\n" " family: %s [%s], script: %d (%s)\n" " weight: %d, italic: %d\n" @@ -1104,7 +1104,7 @@ TQFontDatabase::tqfindFont( TQFont::Script script, const TQFontPrivate *fp, #endif // TQ_WS_X11 // as we know the script is supported, we can be sure - // to tqfind a matching font here. + // to find a matching font here. unsigned int newscore = bestFoundry( override_script, score, request.styleStrategy, try_family, foundry_name, styleKey, request.pixelSize, pitch, @@ -1206,7 +1206,7 @@ TQFontDatabase::tqfindFont( TQFont::Script script, const TQFontPrivate *fp, TQFontDef def = request; if (def.family.isEmpty()) { def.family = fp->request.family; - def.family = def.family.left(def.family.tqfind(',')); + def.family = def.family.left(def.family.find(',')); } TQFontCache::Key key( def, script, #ifdef TQ_WS_WIN @@ -1748,7 +1748,7 @@ TQValueList<int> TQFontDatabase::pointSizes( const TQString &family, #else const uint pointSize = size->pixelSize; // embedded uses 72dpi #endif - if (! sizes.tqcontains(pointSize)) + if (! sizes.contains(pointSize)) sizes.append(pointSize); } } @@ -1849,7 +1849,7 @@ TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family, #else const uint pointSize = size->pixelSize; // embedded uses 72dpi #endif - if (! sizes.tqcontains(pointSize)) + if (! sizes.contains(pointSize)) sizes.append( pointSize ); } } @@ -2476,23 +2476,23 @@ TQString TQFontDatabase::scriptSample(TQFont::Script script) This makes sense of the font family name: - 1) if the family name tqcontains a '-' (ie. "Adobe-Courier"), then we + 1) if the family name contains a '-' (ie. "Adobe-Courier"), then we split at the '-', and use the string as the foundry, and the string to the right as the family - 2) if the family name tqcontains a '[' and a ']', then we take the text + 2) if the family name contains a '[' and a ']', then we take the text between the square brackets as the foundry, and the text before the square brackets as the family (ie. "Arial [Monotype]") */ void TQFontDatabase::parseFontName(const TQString &name, TQString &foundry, TQString &family) { - if ( name.tqcontains('-') ) { - int i = name.tqfind('-'); + if ( name.contains('-') ) { + int i = name.find('-'); foundry = name.left( i ); family = name.right( name.length() - i - 1 ); - } else if ( name.tqcontains('[') && name.tqcontains(']')) { - int i = name.tqfind('['); - int li = name.tqfindRev(']'); + } else if ( name.contains('[') && name.contains(']')) { + int i = name.find('['); + int li = name.findRev(']'); if (i < li) { foundry = name.mid(i + 1, li - i - 1); |