- if(i->font && i->fontid && !strcmp(fontid, i->fontid)) {
- // current font is correct
- } else {
- fontlist_t*l = i->fontlist;
- i->font = 0;
- i->fontid = 0;
- while(l) {
- if(!strcmp((char*)l->id, fontid)) {
- i->font = l->font;
- i->fontid = l->id;
- break;
- }
- l = l->next;
- }
- if(i->font == 0) {
- fprintf(stderr, "Unknown font id: %s", fontid);
- return;
- }
- }
-
- gfxglyph_t*glyph = &i->font->glyphs[glyphnr];
-