All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FontLoader.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Fonts.h"
7 #include "Helpers.h"
8 #include "AsyncTexturing.h"
9 #include <string>
10 #include <vector>
11 
12 namespace Eegeo
13 {
14  namespace Fonts
15  {
16  class FontLoader : protected Eegeo::NonCopyable
17  {
18  public:
21 
23  FontInstance* Load(const std::string& fontInstanceId, const std::string& fontFilename);
24 
26  FontInstance* Load(const std::string& fontFilename, bool generateMipMaps);
27 
28  private:
29  template <typename TReader, typename TResult>
30  void Read(const std::string& fontFilename, TResult& result);
31 
32  FontInstance* LoadInternal(const std::string& fontInstanceId, const std::string& fontFilename, bool generateMipMaps);
33 
34  bool SetupReplacementCharacter(FontCharacterTable& characterTable);
35 
36  Eegeo::Helpers::IFileIO& m_fileIO;
38  };
39  }
40 }