StelFontMgr.hpp   StelFontMgr.hpp 
skipping to change at line 19 skipping to change at line 19
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef STELFONTMGR_H #ifndef _STELFONTMGR_HPP_
#define STELFONTMGR_H #define _STELFONTMGR_HPP_
#include <map> #include <map>
#include <QString> #include <QString>
class SFont; class StelFont;
//! @class StelFontMgr //! @class StelFontMgr
//! Manage fonts for Stellarium. Take into account special font for special language. //! Manage fonts for Stellarium. Take into account special font for special language.
//! It also load fonts and store them in a cache to prevent duplication. //! It also load fonts and store them in a cache to prevent duplication.
//! @author Fabien Chereau <stellarium@free.fr> //! @author Fabien Chereau <stellarium@free.fr>
class StelFontMgr class StelFontMgr
{ {
public: public:
StelFontMgr(); StelFontMgr();
~StelFontMgr(); ~StelFontMgr();
//! Get the standard font associated to the given language ISO code. //! Get the standard font associated to the given language ISO code.
//! @param langageName the ISO language name such as "fr" or "en" or "*" for default. //! @param langageName the ISO language name such as "fr" or "en" or "*" for default.
//! @param size the font size in pixels. //! @param size the font size in pixels.
SFont& getStandardFont(const QString& langageName, double size=12.); StelFont& getStandardFont(const QString& langageName, double size=12 .);
//! Get the fixed font associated to the given language ISO code. //! Get the fixed font associated to the given language ISO code.
//! @param langageName the ISO language name such as "fr" or "en" or "*" for default. //! @param langageName the ISO language name such as "fr" or "en" or "*" for default.
//! @param size the font size in pixels. //! @param size the font size in pixels.
SFont& getFixedFont(const QString& langageName, double size=12.); StelFont& getFixedFont(const QString& langageName, double size=12.);
private: private:
//! @class FontForLanguage //! @class FontForLanguage
//! Class which describes which font to use for a given language ISO code. //! Class which describes which font to use for a given language ISO code.
class FontForLanguage class FontForLanguage
{ {
public: public:
QString langageName; QString langageName;
QString fontFileName; QString fontFileName;
double fontScale; double fontScale;
skipping to change at line 91 skipping to change at line 91
//! Get the structure describing the fonts and scales to use for a g iven language. //! Get the structure describing the fonts and scales to use for a g iven language.
FontForLanguage& getFontForLanguage(const QString& langageName); FontForLanguage& getFontForLanguage(const QString& langageName);
//! Load the associations between languages and font file/scaling. //! Load the associations between languages and font file/scaling.
void loadFontForLanguage(const QString& fontMapFile); void loadFontForLanguage(const QString& fontMapFile);
//! Contains a mapping of font/langage //! Contains a mapping of font/langage
std::map<QString, FontForLanguage> fontMapping; std::map<QString, FontForLanguage> fontMapping;
//! Keeps references on all loaded fonts //! Keeps references on all loaded fonts
std::map<LoadedFont, SFont*, ltLoadedFont> loadedFonts; std::map<LoadedFont, StelFont*, ltLoadedFont> loadedFonts;
}; };
#endif #endif // _STELFONTMGR_HPP_
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/