diff options
author | Russ Cox <rsc@swtch.com> | 2020-05-26 11:24:18 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-05-29 20:58:37 -0400 |
commit | a6ad39aaaa36b8aadc5c35bfc803afbde32918c0 (patch) | |
tree | 67637b31c1eae3fc0dca402355065d87cc4083f7 | |
parent | bfe4377e409ce271c479665e6ef966a7b6008626 (diff) | |
download | plan9port-a6ad39aaaa36b8aadc5c35bfc803afbde32918c0.tar.gz plan9port-a6ad39aaaa36b8aadc5c35bfc803afbde32918c0.tar.bz2 plan9port-a6ad39aaaa36b8aadc5c35bfc803afbde32918c0.zip |
libdraw: handle larger number of subfonts
-rw-r--r-- | include/draw.h | 5 | ||||
-rw-r--r-- | man/man3/cachechars.3 | 2 | ||||
-rw-r--r-- | src/libdraw/openfont.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/include/draw.h b/include/draw.h index 926cc748..9a22e6b6 100644 --- a/include/draw.h +++ b/include/draw.h @@ -311,8 +311,8 @@ struct Font Display *display; short height; /* max height of image, interline spacing */ short ascent; /* top of image to baseline */ - short width; /* widest so far; used in caching only */ - short nsub; /* number of subfonts */ + short width; /* widest so far; used in caching only */ + int nsub; /* number of subfonts */ u32int age; /* increasing counter; used for LRU */ int maxdepth; /* maximum depth of all loaded subfonts */ int ncache; /* size of cache */ @@ -516,6 +516,7 @@ extern Display *display; extern Font *font; extern Image *screen; extern Screen *_screen; +extern int drawmousemask; /* set bits to disable receiving those buttons */ extern int _cursorfd; extern int _drawdebug; /* set to 1 to see errors from flushimage */ extern void _setdrawop(Display*, Drawop); diff --git a/man/man3/cachechars.3 b/man/man3/cachechars.3 index b0c7abfa..f2d82f19 100644 --- a/man/man3/cachechars.3 +++ b/man/man3/cachechars.3 @@ -165,7 +165,7 @@ struct Font { short height; /* max ht of image;interline space*/ short ascent; /* top of image to baseline */ short width; /* widest so far; used in caching */ - short nsub; /* number of subfonts */ + int nsub; /* number of subfonts */ ulong age; /* increasing counter; for LRU */ int ncache; /* size of cache */ int nsubf; /* size of subfont list */ diff --git a/src/libdraw/openfont.c b/src/libdraw/openfont.c index 9312eb43..8714a8c7 100644 --- a/src/libdraw/openfont.c +++ b/src/libdraw/openfont.c @@ -69,7 +69,7 @@ openfont1(Display *d, char *name) n = _drawflength(fd); if(fd < 0 && strncmp(fname, "/mnt/font/", 10) == 0) { fd = _fontpipe(fname+10); - n = 128*1024; + n = 1024*1024; } if(fd < 0){ free(nambuf); |