1
0
Fork 0

cosmetics

This commit is contained in:
mfranz 2006-01-26 22:22:37 +00:00
parent e2016f9568
commit f729ec6013

View file

@ -418,28 +418,26 @@ FGFontCache::get(const char *name, float size, float slant)
{ {
_itt_t it; _itt_t it;
if ((it = _fonts.find(name)) == _fonts.end()) { if ((it = _fonts.find(name)) != _fonts.end())
return it->second->pufont;
SGPath path(_path); SGPath path(_path);
path.append(name); path.append(name);
fnt *f = new fnt(); fnt *f = new fnt();
f->texfont = new fntTexFont; f->texfont = new fntTexFont;
if (f->texfont->load((char *)path.c_str())) { if (f->texfont->load((char *)path.c_str())) {
f->pufont = new puFont; f->pufont = new puFont;
f->pufont->initialize(static_cast<fntFont *>(f->texfont), size, slant); f->pufont->initialize(static_cast<fntFont *>(f->texfont), size, slant);
_fonts[name] = f; _fonts[name] = f;
return f->pufont; return f->pufont;
}
} else {
delete f; delete f;
return _fonts["default"]->pufont; return _fonts["default"]->pufont;
} }
} else {
return it->second->pufont;
}
}
puFont * puFont *
FGFontCache::get(SGPropertyNode *node) FGFontCache::get(SGPropertyNode *node)
{ {