aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/fontsrv/x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/fontsrv/x11.c')
-rw-r--r--src/cmd/fontsrv/x11.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/cmd/fontsrv/x11.c b/src/cmd/fontsrv/x11.c
index 0f6b97bb..c78ad036 100644
--- a/src/cmd/fontsrv/x11.c
+++ b/src/cmd/fontsrv/x11.c
@@ -85,20 +85,23 @@ load(XFont *f)
int idx = charcode/SubfontSize;
- if(charcode > 0xffff)
+ if(charcode > Runemax)
break;
- if(!f->range[idx]) {
+ if(!f->range[idx])
f->range[idx] = 1;
- f->nrange++;
- }
}
+ FT_Done_Face(face);
+
// libdraw expects U+0000 to be present
- if(!f->range[0]) {
+ if(!f->range[0])
f->range[0] = 1;
- f->nrange++;
- }
- FT_Done_Face(face);
+
+ // fix up file list
+ for(i=0; i<nelem(f->range); i++)
+ if(f->range[i])
+ f->file[f->nfile++] = i;
+
f->loaded = 1;
}