libdraw: refine hidpi font selection

Change-Id: Id1e6a2630713024a1925ad1341bb9c846f82e93e
Reviewed-on: https://plan9port-review.googlesource.com/1171
Reviewed-by: Russ Cox <rsc@swtch.com>
This commit is contained in:
Russ Cox 2015-02-17 12:39:36 -05:00
parent 213fc4f6fb
commit 79555a9987
4 changed files with 44 additions and 1 deletions

View file

@ -28,6 +28,7 @@ buildfont(Display *d, char *buf, char *name)
fnt->scale = 1;
fnt->display = d;
fnt->name = strdup(name);
fnt->namespec = strdup(name);
fnt->ncache = NFCACHE+NFLOOK;
fnt->nsubf = NFSUBF;
fnt->cache = malloc(fnt->ncache * sizeof(fnt->cache[0]));
@ -135,6 +136,7 @@ freefont(Font *f)
}
freeimage(f->cacheimage);
free(f->name);
free(f->namespec);
free(f->cache);
free(f->subf);
free(f->sub);