make it possible to access fonts without a display.

This commit is contained in:
rsc 2004-04-25 20:26:27 +00:00
parent a2c2caaafe
commit 4e20688042
7 changed files with 78 additions and 48 deletions

View file

@ -27,10 +27,12 @@ readsubfonti(Display*d, char *name, int fd, Image *ai, int dolock)
n = atoi(hdr);
p = malloc(6*(n+1));
if(p == nil)
return nil;
goto Err;
if(read(fd, p, 6*(n+1)) != 6*(n+1)){
werrstr("rdsubfonfile: fontchar read error: %r");
Err:
if(ai == nil)
freeimage(i);
free(p);
return nil;
}