fooonts :3
This commit is contained in:
parent
8bb2415f7b
commit
f96ee17823
|
|
@ -82,7 +82,7 @@ SharedFontState::~SharedFontState(){
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedFontState::initFontSetCB(SDL_IOStream* &ops, const std::string &filename){
|
void SharedFontState::initFontSetCB(SDL_IOStream* &ops, const std::string &filename){
|
||||||
TTF_Font *font = TTF_OpenFontIO(ops, false, 0);
|
TTF_Font *font = TTF_OpenFontIO(ops, false, 16);
|
||||||
|
|
||||||
if (!font)
|
if (!font)
|
||||||
return;
|
return;
|
||||||
|
|
@ -101,6 +101,9 @@ void SharedFontState::initFontSetCB(SDL_IOStream* &ops, const std::string &filen
|
||||||
}
|
}
|
||||||
|
|
||||||
TTF_Font *SharedFontState::getFont(std::string family, int size){
|
TTF_Font *SharedFontState::getFont(std::string family, int size){
|
||||||
|
if (family.empty())
|
||||||
|
family = "Terminus (TTF)"; // terminus hardcoded :3c
|
||||||
|
|
||||||
/* Check for substitutions */
|
/* Check for substitutions */
|
||||||
if (p->subs.contains(family))
|
if (p->subs.contains(family))
|
||||||
family = p->subs[family];
|
family = p->subs[family];
|
||||||
|
|
@ -131,7 +134,7 @@ TTF_Font *SharedFontState::getFont(std::string family, int size){
|
||||||
? req.regular.c_str() : req.other.c_str();
|
? req.regular.c_str() : req.other.c_str();
|
||||||
|
|
||||||
//ops = SDL_OpenIO();
|
//ops = SDL_OpenIO();
|
||||||
SDL_IOStream* ops;
|
// SDL_IOStream* ops;
|
||||||
shState->fileSystem().openReadRaw(ops, path);
|
shState->fileSystem().openReadRaw(ops, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue