Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1629)

Unified Diff: src/cmd/fontsrv/showpjw.c

Issue 6854130: code review 6854130: fontsrv: scaled pjw (Closed)
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/fontsrv/pjw.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/fontsrv/showpjw.c
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/cmd/fontsrv/showpjw.c
@@ -0,0 +1,38 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <event.h>
+
+void eresized(int);
+
+void
+main(void)
+{
+ initdraw(nil, nil, nil);
+
+ einit(Emouse);
+ eresized(0);
+ for(;;)
+ emouse();
+}
+
+void
+eresized(int new)
+{
+ Point p;
+ int i;
+ char buf[100];
+
+ if(new && getwindow(display, Refnone) < 0)
+ sysfatal("getwindow: %r");
+
+ p = addpt(screen->r.min, Pt(10, 10));
+ draw(screen, screen->r, display->white, nil, ZP);
+ for(i=10; i<=50; i+=i/10) {
+ sprint(buf, "/mnt/font/LucidaGrande/%da/font", i);
+ font = openfont(display, buf);
+ string(screen, p, display->black, ZP, font, "Unknown char: \xe1\x88\xb4");
+ p.y += stringsize(font, "Unknown char: \xe1\x88\xb4").y;
+ }
+ flushimage(display, 1);
+}
« no previous file with comments | « src/cmd/fontsrv/pjw.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b