ref: 46bff4d5c16fdc4716f6a2590acd374b2a5f547f
parent: 7e7c94ae13d01d4796a27975f1be818d2111079a
author: Ali Gholami Rudi <ali@rudi.ir>
date: Sat May 4 15:48:51 EDT 2013
font: allow glyphs with duplicate ids
--- a/font.c
+++ b/font.c
@@ -29,16 +29,6 @@
return NULL;
}
-static struct glyph *font_glyphmk(struct font *fn, char *id)
-{
- struct glyph *g = font_glyph(fn, id);
- if (g)
- return g;
- g = &fn->glyphs[fn->nglyphs++];
- strcpy(g->id, id);
- return g;
-}
-
static void font_charset(struct font *fn, FILE *fin)
{
char tok[ILNLEN];
@@ -56,7 +46,8 @@
wid = atoi(tok);
fscanf(fin, "%d %s", &type, id);
skipline(fin);
- glyph = font_glyphmk(fn, id);
+ glyph = &fn->glyphs[fn->nglyphs++];
+ strcpy(glyph->id, id);
strcpy(glyph->name, name);
glyph->wid = wid;
glyph->type = type;