if (fonts[i]->loaded)
return true;
- if (fonts[i]->load (height))
- return fonts[i]->loaded = true;
+ fonts[i]->loaded = true;
- delete fonts[i];
- fonts.erase (fonts.begin () + i);
+ if (!fonts[i]->load (height))
+ {
+ fonts[i]->cs = CS_UNKNOWN;
+ return false;
+ }
- return false;
+ return true;
}
void
goto next_font;
if (!realize_font (i))
- {
- --i;
- goto next_font;
- }
-
- //printf ("added font %s for %04lx\n", f->name, unicode);
+ goto next_font;
}
- if (f->has_codepoint (unicode))
+ if (f->cs != CS_UNKNOWN && f->has_codepoint (unicode))
return i;
next_font:
{
fonts.push_back (new_font (fallback->name, fallback->cs));
fallback++;
+ i = 0;
}
}
/*
- * $Id: defaultfont.h,v 1.5 2003-11-25 15:25:17 pcg Exp $
+ * $Id: defaultfont.h,v 1.6 2003-12-04 00:43:26 pcg Exp $
*/
#ifndef _DEFAULTFONT_H_
char *name;
codeset cs;
- bool loaded;
+ bool loaded; // wether we tried loading it before (not wether it's loaded)
// managed by the font object
bool prop; // wether this is a proportional font or has other funny characteristics