make it possible to access fonts without a display.
This commit is contained in:
parent
a2c2caaafe
commit
4e20688042
7 changed files with 78 additions and 48 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue