shithub: neatroff

Download patch

ref: a86ce8ef459965a80f433a7832804b1561ff5769
parent: 9e504b57b529c927dfc8f00fb7a799303ad2ad9d
author: Ali Gholami Rudi <[email protected]>
date: Wed Apr 4 13:18:39 EDT 2018

font: store every glyph described in the font descriptor

--- a/font.c
+++ b/font.c
@@ -332,13 +332,10 @@
 	if (strcmp("\"", tok)) {
 		if (fscanf(fin, "%d %s", &type, id) != 2)
 			return 1;
-		*gid = dict_get(fn->gl_dict, id);
-		if (*gid < 0) {
-			*gid = font_glyphput(fn, id, name, type);
-			g = &fn->gl[*gid];
-			sscanf(tok, "%hd,%hd,%hd,%hd,%hd", &g->wid,
-				&g->llx, &g->lly, &g->urx, &g->ury);
-		}
+		*gid = font_glyphput(fn, id, name, type);
+		g = &fn->gl[*gid];
+		sscanf(tok, "%hd,%hd,%hd,%hd,%hd", &g->wid,
+			&g->llx, &g->lly, &g->urx, &g->ury);
 		dict_put(fn->ch_dict, name, *gid);
 		(*n)++;
 	} else {