Adding FreeType font generation

This commit is contained in:
Matt Tuttle
2014-07-13 15:49:08 -05:00
parent 7e207a8232
commit 6d7388212a
10 changed files with 361 additions and 17 deletions

View 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

View File

@@ -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;