diff options
author | chai <chaifix@163.com> | 2018-10-15 07:18:13 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-15 07:18:13 +0800 |
commit | ddfedbff7d9ea4f344173ef2c228a51a778d7433 (patch) | |
tree | 4e8c40bee95f5ba91a2808ca9a14cea5937bea52 /src/libjin/Graphics/Font/TTF.h | |
parent | b1bbc998960fff2169dc5a992c47d08723472f9b (diff) |
+从TTFData创建TTF的接口
Diffstat (limited to 'src/libjin/Graphics/Font/TTF.h')
-rw-r--r-- | src/libjin/Graphics/Font/TTF.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libjin/Graphics/Font/TTF.h b/src/libjin/Graphics/Font/TTF.h index 4f51138..7f4f873 100644 --- a/src/libjin/Graphics/Font/TTF.h +++ b/src/libjin/Graphics/Font/TTF.h @@ -19,11 +19,13 @@ namespace jin { namespace graphics { + + class TTF; /** * TTFData - * |- TTF - * |- TTF + * |- TTF(14px) + * |- TTF(15px) * . * . * . @@ -35,7 +37,9 @@ namespace graphics ~TTFData(); - void pushTTFsize(unsigned int ttfsize); + TTF* createTTF(unsigned ttfsize); + + void pushTTFsize(unsigned ttfsize); void popTTFsize(); Channel* getCodepointBitmapAlpha(unsigned int codepoint, int* width, int* height, int* xoff, int* yoff) const; @@ -62,7 +66,7 @@ namespace graphics class TTF : public Font { public: - static TTF* createTTF(TTFData* ttfData, unsigned int ttfSzie); + static TTF* createTTF(TTFData* ttfData, unsigned ttfSzie); Page* typeset(const Text& text, int lineheight, int spacing = 0) override; Page* typeset(const Content& text, int lineheight, int spacing = 0) override; @@ -74,6 +78,8 @@ namespace graphics ~TTF(); private: + friend class TTFData; + struct TTFGlyph { GLuint atlas; |