Adding FreeType font generation
This commit is contained in:
34
project/include/graphics/Font.h
Normal file
34
project/include/graphics/Font.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef LIME_GRAPHICS_FONT_H
|
||||
#define LIME_GRAPHICS_FONT_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
#include <list>
|
||||
#include <graphics/Image.h>
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class Font {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
Font (const char *fontFace);
|
||||
value LoadGlyphs (int size, const char *glyphs, Image *image);
|
||||
|
||||
private:
|
||||
|
||||
FT_Face face;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -17,10 +17,13 @@ namespace lime {
|
||||
Image ();
|
||||
~Image ();
|
||||
|
||||
void Resize (int width, int height, int bpp = 4);
|
||||
void Blit (const unsigned char *data, int x, int y, int width, int height);
|
||||
value Value ();
|
||||
|
||||
int width;
|
||||
int height;
|
||||
int bpp; // bytes per pixel
|
||||
ByteArray *data;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user