add FontManager::load_font()
This commit is contained in:
parent
d9261409e0
commit
dc47bf5256
@ -11,4 +11,12 @@ namespace jes
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
FontRef FontManager::load_font(const char * fname, size_t size)
|
||||
{
|
||||
FontRef font = new Font();
|
||||
if (!font->load(m_ft, fname, size))
|
||||
return NULL;
|
||||
return font;
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define JES_FONTMANAGER_H
|
||||
|
||||
#include "jes/Ref.h"
|
||||
#include "Font.h"
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
@ -11,6 +12,7 @@ namespace jes
|
||||
{
|
||||
public:
|
||||
FontManager();
|
||||
FontRef load_font(const char * fname, size_t size);
|
||||
protected:
|
||||
FT_Library m_ft;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user