add Font_RenderGlyph()
This commit is contained in:
parent
f17351072f
commit
0ca8e044b2
12
src/Font.cc
12
src/Font.cc
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user