remove FontManager module
This commit is contained in:
parent
40719e085a
commit
9203a94a71
@ -1,39 +0,0 @@
|
||||
#include "FontManager.h"
|
||||
#include <iostream>
|
||||
|
||||
bool FontManager::load()
|
||||
{
|
||||
if (FT_Init_FreeType(&m_ft) != 0)
|
||||
{
|
||||
std::cerr << "Error initializing FreeType" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Load failsafe font */
|
||||
m_mono_font = load_font("FreeMono", 20);
|
||||
|
||||
if (m_mono_font == NULL)
|
||||
{
|
||||
std::cerr << "Error loading FreeMono font" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
FontRef FontManager::load_font(const char * fname, size_t size)
|
||||
{
|
||||
/* TODO */
|
||||
return NULL;
|
||||
#if 0
|
||||
PathRef font_path = Runtime::locate(Runtime::FONT, fname);
|
||||
if (font_path == NULL)
|
||||
return NULL;
|
||||
|
||||
FontRef font = new Font();
|
||||
if (!font->load(m_ft, font_path->to_s().c_str(), size))
|
||||
return NULL;
|
||||
|
||||
return font;
|
||||
#endif
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
#ifndef JES_FONTMANAGER_H
|
||||
#define JES_FONTMANAGER_H
|
||||
|
||||
#include "Ref.h"
|
||||
#include "Font.h"
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
|
||||
class FontManager
|
||||
{
|
||||
public:
|
||||
bool load();
|
||||
FontRef load_font(const char * fname, size_t size);
|
||||
FontRef get_mono_font() { return m_mono_font; }
|
||||
protected:
|
||||
FT_Library m_ft;
|
||||
FontRef m_mono_font;
|
||||
};
|
||||
|
||||
typedef Ref<FontManager> FontManagerRef;
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user