From 40fc27154fe754181934dc7ee31375e6bdfb33fc Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 23 Oct 2018 12:23:58 +0800 Subject: *merge from minimal --- src/libjin/Graphics/Font.h | 61 ---------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 src/libjin/Graphics/Font.h (limited to 'src/libjin/Graphics/Font.h') diff --git a/src/libjin/Graphics/Font.h b/src/libjin/Graphics/Font.h deleted file mode 100644 index 7fc96e2..0000000 --- a/src/libjin/Graphics/Font.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef __JIN_FONT_H -#define __JIN_FONT_H -#include "../modules.h" -#if JIN_MODULES_RENDER - -#include "drawable.h" -#include "../3rdparty/stb/stb_truetype.h" -#include "../math/quad.h" - -namespace jin -{ -namespace graphics -{ - /** - * Usage of stb_truetype.h here might be a little - * bit dummy. Implementation of Font is referring - * to stb_truetype.h L243~284. I basicly copy it:) - */ - class Font: public Drawable - { - public: - - Font(); - - /** - * load ttf font data from .ttf - */ - void loadf(const char* file); - - /** - * load ttf font data from memory - */ - void loadb(const unsigned char* data); - - /** - * render text to screen - */ - void render( - const char* str, // rendered text - float x, float y, // render position - int fheight, // font size - int spacing, // font spacing - int lheight // line height - ); - - void box(const char* str, int fheight, int spacing, int lheight, int* w, int * h); - - private: - - /** - * ASCII 32(space)..126(~) is 95 glyphs - */ - stbtt_bakedchar cdata[96]; - - }; - -} -} - -#endif // JIN_MODULES_RENDER -#endif // __JIN_FONT_H \ No newline at end of file -- cgit v1.1-26-g67d0