00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00025 #ifndef _GLHYPH_OUTLINE_LOADER_H_
00026 #define _GLHYPH_OUTLINE_LOADER_H_
00027
00028 #include <string>
00029 #include <map>
00030
00031 #include <ft2build.h>
00032 #include FT_FREETYPE_H
00033
00034 namespace LetterCDT
00035 {
00036 class GlyphOutline;
00037
00041 class GlyphOutlineLoader
00042 {
00043 public:
00046 GlyphOutlineLoader(const std::wstring& fontFile);
00047
00049 ~GlyphOutlineLoader(void);
00050
00054 GlyphOutline* GetGlyphOutline(wchar_t charCode);
00055
00056 private:
00058 FT_Library m_library;
00059
00061 FT_Face m_face;
00062
00064 std::map<wchar_t, GlyphOutline*> m_glyphOutlines;
00065
00067 GlyphOutlineLoader(const GlyphOutlineLoader&);
00068
00070 GlyphOutlineLoader& operator=(const GlyphOutlineLoader&);
00071
00074 void LoadFontFace(const std::wstring& fontFile);
00075
00077 void Destroy(void);
00078 };
00079
00080 }
00081
00082 #endif