diff options
author | Russ Cox <rsc@swtch.com> | 2020-05-26 11:36:59 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-05-29 20:58:37 -0400 |
commit | 5f0fa185d0a978b45de5bf206193769596c056b5 (patch) | |
tree | 98c8c32d74ccf5bdc787b8c527de0cc2d5597bd1 /src/cmd/fontsrv/x11.c | |
parent | a6ad39aaaa36b8aadc5c35bfc803afbde32918c0 (diff) | |
download | plan9port-5f0fa185d0a978b45de5bf206193769596c056b5.tar.gz plan9port-5f0fa185d0a978b45de5bf206193769596c056b5.tar.bz2 plan9port-5f0fa185d0a978b45de5bf206193769596c056b5.zip |
fontsrv: handle non-BMP runes on X11
Have to adjust algorithms to deal with
much larger number of subfont files as well.
Diffstat (limited to 'src/cmd/fontsrv/x11.c')
-rw-r--r-- | src/cmd/fontsrv/x11.c | 19 |
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; } |