-rw-r--r-- | library/fontdatabase.cpp | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp index 50dcf3d..c64e645 100644 --- a/library/fontdatabase.cpp +++ b/library/fontdatabase.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
@@ -25,5 +25,7 @@ | |||
25 | #include <qpe/qlibrary.h> | 25 | #include <qpe/qlibrary.h> |
26 | 26 | ||
27 | #ifdef QWS | ||
27 | #include <qfontmanager_qws.h> | 28 | #include <qfontmanager_qws.h> |
29 | #endif | ||
28 | #include <qdir.h> | 30 | #include <qdir.h> |
29 | #include <qdict.h> | 31 | #include <qdict.h> |
@@ -59,22 +61,20 @@ QValueList<FontFactory> *FontDatabase::factoryList = 0; | |||
59 | \brief The FontDatabase class provides information about available fonts. | 61 | \brief The FontDatabase class provides information about available fonts. |
60 | 62 | ||
61 | Provides information about available fonts. | 63 | Most often you will simply want to query the database for the |
62 | 64 | available font families(). | |
63 | FontDatabase provides information about the available fonts of the | ||
64 | underlying window system. | ||
65 | 65 | ||
66 | Most often you will simply want to query the database for all font | 66 | Use FontDatabase rather than QFontDatabase when you may need access |
67 | families(), and their respective pointSizes(), styles() and charSets(). | 67 | to fonts that are not normally available. For example, if the |
68 | freetype library and the Qtopia freetype plugin are installed, | ||
69 | TrueType fonts will be available to your application. Font renderer | ||
70 | plugins have greater resource requirements than system fonts so they | ||
71 | should be used only when necessary. You can force the loading of | ||
72 | font renderer plugins with loadRenderers(). | ||
68 | 73 | ||
69 | Use FontDatabase rather than QFontDatabase when you may need access to | 74 | \ingroup qtopiaemb |
70 | fonts not normally available. For example, if the freetype library and | ||
71 | Qtopia freetype plugin are installed TrueType fonts will be available | ||
72 | to your application. Font renderer plugins have greater resource | ||
73 | requirements than the system fonts so they should be used only when | ||
74 | necessary. | ||
75 | */ | 75 | */ |
76 | 76 | ||
77 | /*! | 77 | /*! |
78 | Constructs the FontDatabase class. | 78 | Constructs a FontDatabase object. |
79 | */ | 79 | */ |
80 | FontDatabase::FontDatabase() | 80 | FontDatabase::FontDatabase() |
@@ -88,5 +88,5 @@ FontDatabase::FontDatabase() | |||
88 | 88 | ||
89 | /*! | 89 | /*! |
90 | Returns a list of names of all available font families. | 90 | Returns a list of names of all the available font families. |
91 | */ | 91 | */ |
92 | QStringList FontDatabase::families() const | 92 | QStringList FontDatabase::families() const |
@@ -142,6 +142,6 @@ QValueList<int> FontDatabase::standardSizes() | |||
142 | 142 | ||
143 | /*! | 143 | /*! |
144 | Load any font renderer plugins that are available and make fonts that | 144 | Load any font renderer plugins that are available and make the fonts |
145 | the plugins can read available. | 145 | that the plugins can read available. |
146 | */ | 146 | */ |
147 | void FontDatabase::loadRenderers() | 147 | void FontDatabase::loadRenderers() |
@@ -189,5 +189,4 @@ void FontDatabase::loadRenderers() | |||
189 | void FontDatabase::readFonts( QFontFactory *factory ) | 189 | void FontDatabase::readFonts( QFontFactory *factory ) |
190 | { | 190 | { |
191 | |||
192 | // Load in font definition file | 191 | // Load in font definition file |
193 | QString fn = fontDir() + "fontdir"; | 192 | QString fn = fontDir() + "fontdir"; |
@@ -221,9 +220,7 @@ void FontDatabase::readFonts( QFontFactory *factory ) | |||
221 | weight,size,flags,filename); | 220 | weight,size,flags,filename); |
222 | qt_fontmanager->diskfonts.append(qdf); | 221 | qt_fontmanager->diskfonts.append(qdf); |
223 | #ifndef QT_NO_FONTDATABASE | ||
224 | #if QT_VERSION >= 232 | 222 | #if QT_VERSION >= 232 |
225 | QFontDatabase::qwsAddDiskFont( qdf ); | 223 | QFontDatabase::qwsAddDiskFont( qdf ); |
226 | #endif | 224 | #endif |
227 | #endif | ||
228 | } | 225 | } |
229 | } | 226 | } |