1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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);
}
|