forked from 0ad/0ad
Font pathname change; force font texture load on creation.
This was SVN commit r299.
This commit is contained in:
parent
7468989b4f
commit
48ded3ab46
@ -1,4 +1,5 @@
|
|||||||
#include "NPFont.h"
|
#include "NPFont.h"
|
||||||
|
#include "Renderer.h"
|
||||||
|
|
||||||
NPFont::NPFont()
|
NPFont::NPFont()
|
||||||
{
|
{
|
||||||
@ -62,7 +63,7 @@ NPFont* NPFont::create(const char* name)
|
|||||||
delete font;
|
delete font;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
CStr texname("gui/fonts/");
|
CStr texname("fonts/");
|
||||||
for (uint i=0;i<namelen;i++) {
|
for (uint i=0;i<namelen;i++) {
|
||||||
char c;
|
char c;
|
||||||
if (fread(&c,sizeof(char),1,fp)!=1) {
|
if (fread(&c,sizeof(char),1,fp)!=1) {
|
||||||
@ -77,6 +78,8 @@ NPFont* NPFont::create(const char* name)
|
|||||||
// store font name
|
// store font name
|
||||||
font->_name=name;
|
font->_name=name;
|
||||||
|
|
||||||
|
g_Renderer.LoadTexture(&font->_texture,0);
|
||||||
|
|
||||||
// return created font
|
// return created font
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user