shithub: pdffs

Download patch

ref: dee52587b85a66c8309d36f2cb0c24c29775343a
parent: 9a3fed882c22cb37c58cbfda5eab260410bb274d
author: Noam Preil <noam@pixelhero.dev>
date: Tue Sep 6 23:01:09 EDT 2022

render: simplify glyph rendering

--- a/op.c
+++ b/op.c
@@ -715,16 +715,7 @@
 					return bufput(&p->buf, (uchar*)"{", 1) == 1;
 				if(strcmp(o->name, "arrowright") == 0)
 					return bufput(&p->buf, (uchar*)"→", strlen("→")) == strlen("→");
-				buf[1] = 0;
-				for(buf[0] = 'A'; buf[0] <= 'Z'; buf[0] += 1)
-					if(strcmp(buf, o->name) == 0)
-						return bufput(&p->buf, (uchar*)buf, 1) == 1;
-				for(buf[0] = 'a'; buf[0] <= 'z'; buf[0] += 1)
-					if(strcmp(buf, o->name) == 0)
-						return bufput(&p->buf, (uchar*)buf, 1) == 1;
-				return bufput(&p->buf, &c, 1);
-				fprint(2, "TODO: recognize glyph name '%s', num %d, char %c\n", o->name, d, c);
-				return 1;
+				break;
 			} else
 				d += 1;
 		}