- V_GetFont() needs to check the font header.

SVN r2181 (trunk)
This commit is contained in:
Randy Heit 2010-02-26 20:19:43 +00:00
parent d530fd7f90
commit 54b792a97f

View file

@ -264,12 +264,13 @@ FFont *V_GetFont(const char *name)
if (lump != -1)
{
char head[3];
uint32 head;
{
FWadLump lumpy = Wads.OpenLumpNum (lump);
lumpy.Read (head, 3);
lumpy.Read (&head, 4);
}
if (head[0] == 'F' && head[1] == 'O' && head[2] == 'N')
if ((head & MAKE_ID(255,255,255,0)) == MAKE_ID('F','O','N',0) ||
head == MAKE_ID(0xE1,0xE6,0xD5,0x1A))
{
font = new FSingleLumpFont (name, lump);
}