diff --git a/src/Font.cc b/src/Font.cc index 8567f0d..74ef8d3 100644 --- a/src/Font.cc +++ b/src/Font.cc @@ -1,5 +1,4 @@ #include "Font.h" -#include "ruby.h" #include "GLTexture.h" #include #include @@ -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(); + } +} diff --git a/src/Font.h b/src/Font.h index 92aaaea..d1a85bc 100644 --- a/src/Font.h +++ b/src/Font.h @@ -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