diff options
author | chai <chaifix@163.com> | 2018-10-14 22:52:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-14 22:52:40 +0800 |
commit | b1bbc998960fff2169dc5a992c47d08723472f9b (patch) | |
tree | 220f3bd5de2266e248884e11161dd715d7632ef2 /src/libjin/Graphics/FontData.h | |
parent | fbf989f9950a38566e0fb0fc5b6a7aebc9f0fb45 (diff) |
*直接渲染字符串
Diffstat (limited to 'src/libjin/Graphics/FontData.h')
-rw-r--r-- | src/libjin/Graphics/FontData.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/libjin/Graphics/FontData.h b/src/libjin/Graphics/FontData.h deleted file mode 100644 index c75b9a1..0000000 --- a/src/libjin/Graphics/FontData.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __LIBJIN_FONTDATA_H -#define __LIBJIN_FONTDATA_H -#include "../3rdparty/stb/stb_truetype.h" -#include "Color.h" -#include <vector> - -namespace jin -{ -namespace graphics -{ - - class FontData - { - public: - static FontData* createFontData(const unsigned char* data, unsigned int size); - - ~FontData(); - - void pushFontsize(unsigned int fontsize); - void popFontsize(); - - Channel* getCodepointBitmapAlpha(unsigned int codepoint, int* width, int* height, int* xoff, int* yoff) const; - Color* getCodepointBitmap(unsigned int codepoint, int* width, int* height, int* xoff, int* yoff) const; - void getVMetrics(int* baseline, int* descent); - void getHMetrics(unsigned int codepoint, int* advanceWidth, int* leftSideBearing); - - private: - static const unsigned int FONT_SIZE = 12; - - FontData(const unsigned char* data, unsigned int size); - - stbtt_fontinfo info; - struct - { - unsigned char* data; - unsigned int size; - } raw; - std::vector<float> scales; - - }; - -} -} - -#endif
\ No newline at end of file |