commit - 686f5d035cc111a6a18d918ef60929f24b0cb424
commit + bb4b8acc26034791cb60bddf66924babb22e4522
blob - b2189be98fbe3f33ecf24f6ad4eba56a9cd406f0
blob + 54cd52a8b7ef5b6a556a23b7c066a6ae2c46c9b9
--- src/cmd/fontsrv/main.c
+++ src/cmd/fontsrv/main.c
case Qfontfile:
f = &xfont[QFONT(path)];
load(f);
- length = 11+1+11+1+f->nfile*(6+1+6+1+9+1);
+ length = 11+1+11+1+f->nfile*(8+1+8+1+11+1);
name = "font";
break;
case Qsubfontfile:
- snprint(buf, sizeof buf, "x%04x.bit", (int)QRANGE(path)*SubfontSize);
+ snprint(buf, sizeof buf, "x%06x.bit", (int)QRANGE(path)*SubfontSize);
name = buf;
break;
}
goto NotFound;
p++;
n = strtoul(p, &p, 16);
- if(p < name+5 || p > name+5 && name[1] == '0' || n%SubfontSize != 0 || n/SubfontSize >= MaxSubfont || strcmp(p, ".bit") != 0 || !f->range[n/SubfontSize])
+ if(p < name+7 || p > name+7 && name[1] == '0' || n%SubfontSize != 0 || n/SubfontSize >= MaxSubfont || strcmp(p, ".bit") != 0 || !f->range[n/SubfontSize])
goto NotFound;
path += Qsubfontfile - Qsizedir + qpath(0, 0, 0, 0, n/SubfontSize);
break;
f->loadheight(f, QSIZE(path), &height, &ascent);
fmtprint(&fmt, "%11d %11d\n", height, ascent);
for(i=0; i<f->nfile; i++)
- fmtprint(&fmt, "0x%04x 0x%04x x%04x.bit\n", f->file[i]*SubfontSize, ((f->file[i]+1)*SubfontSize) - 1, f->file[i]*SubfontSize);
+ fmtprint(&fmt, "0x%06x 0x%06x x%06x.bit\n", f->file[i]*SubfontSize, ((f->file[i]+1)*SubfontSize) - 1, f->file[i]*SubfontSize);
f->fonttext = fmtstrflush(&fmt);
f->nfonttext = strlen(f->fonttext);
}