ref: 3a41ce3bf314caad67c2c52a06142f7ac60611c7
parent: 4d919ab612f61c1ef1b21d41513f264d57c010d4
author: mischief <mischief@offblast.org>
date: Fri Oct 12 04:32:19 EDT 2018
truetypefs: fix subfont indices (thanks aiju!)
--- a/sys/src/cmd/truetypefs.c
+++ b/sys/src/cmd/truetypefs.c
@@ -99,15 +99,15 @@
for(c = u->cmap; c < u->cmap + u->ncmap; c++){
for(k = c->start; k < c->end; k += MAXSUB){
s = emalloc(sizeof(TSubfont));
- s->start = c->start;
- if(c->start == 0) got0 = 1;
+ s->start = k;
+ if(k == 0) got0 = 1;
s->end = k + MAXSUB - 1;
if(s->end > c->end)
s->end = c->end;
s->font = f;
s->qid = (Qid){qidgen(), 0, 0};
- s->next = f->sub[c->start >> 8 & 0xff];
- f->sub[c->start >> 8 & 0xff] = s;
+ s->next = f->sub[k >> 8 & 0xff];
+ f->sub[k >> 8 & 0xff] = s;
fmtprint(&fmt, "%#.4ux\t%#.4ux\ts.%.4ux-%.4ux\n", s->start, s->end, s->start, s->end);
}
}