libdraw: handle larger number of subfonts
This commit is contained in:
parent
bfe4377e40
commit
a6ad39aaaa
3 changed files with 5 additions and 4 deletions
|
|
@ -312,7 +312,7 @@ struct Font
|
||||||
short height; /* max height of image, interline spacing */
|
short height; /* max height of image, interline spacing */
|
||||||
short ascent; /* top of image to baseline */
|
short ascent; /* top of image to baseline */
|
||||||
short width; /* widest so far; used in caching only */
|
short width; /* widest so far; used in caching only */
|
||||||
short nsub; /* number of subfonts */
|
int nsub; /* number of subfonts */
|
||||||
u32int age; /* increasing counter; used for LRU */
|
u32int age; /* increasing counter; used for LRU */
|
||||||
int maxdepth; /* maximum depth of all loaded subfonts */
|
int maxdepth; /* maximum depth of all loaded subfonts */
|
||||||
int ncache; /* size of cache */
|
int ncache; /* size of cache */
|
||||||
|
|
@ -516,6 +516,7 @@ extern Display *display;
|
||||||
extern Font *font;
|
extern Font *font;
|
||||||
extern Image *screen;
|
extern Image *screen;
|
||||||
extern Screen *_screen;
|
extern Screen *_screen;
|
||||||
|
extern int drawmousemask; /* set bits to disable receiving those buttons */
|
||||||
extern int _cursorfd;
|
extern int _cursorfd;
|
||||||
extern int _drawdebug; /* set to 1 to see errors from flushimage */
|
extern int _drawdebug; /* set to 1 to see errors from flushimage */
|
||||||
extern void _setdrawop(Display*, Drawop);
|
extern void _setdrawop(Display*, Drawop);
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ struct Font {
|
||||||
short height; /* max ht of image;interline space*/
|
short height; /* max ht of image;interline space*/
|
||||||
short ascent; /* top of image to baseline */
|
short ascent; /* top of image to baseline */
|
||||||
short width; /* widest so far; used in caching */
|
short width; /* widest so far; used in caching */
|
||||||
short nsub; /* number of subfonts */
|
int nsub; /* number of subfonts */
|
||||||
ulong age; /* increasing counter; for LRU */
|
ulong age; /* increasing counter; for LRU */
|
||||||
int ncache; /* size of cache */
|
int ncache; /* size of cache */
|
||||||
int nsubf; /* size of subfont list */
|
int nsubf; /* size of subfont list */
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ openfont1(Display *d, char *name)
|
||||||
n = _drawflength(fd);
|
n = _drawflength(fd);
|
||||||
if(fd < 0 && strncmp(fname, "/mnt/font/", 10) == 0) {
|
if(fd < 0 && strncmp(fname, "/mnt/font/", 10) == 0) {
|
||||||
fd = _fontpipe(fname+10);
|
fd = _fontpipe(fname+10);
|
||||||
n = 128*1024;
|
n = 1024*1024;
|
||||||
}
|
}
|
||||||
if(fd < 0){
|
if(fd < 0){
|
||||||
free(nambuf);
|
free(nambuf);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue