add Font_RenderGlyph()

This commit is contained in:
Josh Holtrop 2014-08-05 22:18:22 -04:00
parent f17351072f
commit 0ca8e044b2
2 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,4 @@
#include "Font.h"
#include "ruby.h"
#include "GLTexture.h"
#include <iostream>
#include <stdint.h>
@ -186,3 +185,14 @@ bool Glyph::load(FT_Face face, FT_ULong char_code)
m_loaded = true;
return true;
}
void Font_RenderGlyph(VALUE font_obj, unsigned long char_code)
{
Font * font;
Data_Get_Struct(font_obj, Font, font);
GlyphRef g = get_glyph(font, char_code);
if (g != NULL)
{
g->render();
}
}

View File

@ -1,6 +1,9 @@
#ifndef JES_FONT_H
#define JES_FONT_H
#include "ruby.h"
void Font_Init();
void Font_RenderGlyph(VALUE font_obj, unsigned long char_code);
#endif