shithub: neatpost

Download patch

ref: e154209b4a25647bab193519d269cf59f8b33910
parent: f5144a0fb1334c32890f4077ea1ea937701b8d29
author: Ali Gholami Rudi <ali@rudi.ir>
date: Fri Jun 14 18:58:21 EDT 2013

font: call strcmp() less frequently in font_find()

--- a/font.c
+++ b/font.c
@@ -15,7 +15,7 @@
 {
 	int i;
 	for (i = 0; i < fn->n; i++)
-		if (!strcmp(name, fn->c[i]))
+		if (name[0] == fn->c[i][0] && !strcmp(name, fn->c[i]))
 			return fn->g[i];
 	return NULL;
 }