aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/fontsrv/mac.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-05-26 11:36:59 -0400
committerRuss Cox <rsc@swtch.com>2020-05-29 20:58:37 -0400
commit5f0fa185d0a978b45de5bf206193769596c056b5 (patch)
tree98c8c32d74ccf5bdc787b8c527de0cc2d5597bd1 /src/cmd/fontsrv/mac.c
parenta6ad39aaaa36b8aadc5c35bfc803afbde32918c0 (diff)
downloadplan9port-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/mac.c')
-rw-r--r--src/cmd/fontsrv/mac.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/fontsrv/mac.c b/src/cmd/fontsrv/mac.c
index b4dadd90..9829b5a8 100644
--- a/src/cmd/fontsrv/mac.c
+++ b/src/cmd/fontsrv/mac.c
@@ -200,9 +200,12 @@ load(XFont *f)
f->loadheight = fontheight;
// enable all Unicode ranges
+ if(nelem(f->file) > 0xffff)
+ sysfatal("too many subfiles"); // f->file holds ushorts
for(i=0; i<nelem(f->range); i++) {
f->range[i] = 1;
- f->nrange++;
+ f->file[i] = i;
+ f->nfile++;
}
}
@@ -233,7 +236,6 @@ mksubfont(XFont *f, char *name, int lo, int hi, int size, int antialias)
if(font == nil)
return nil;
-
bbox = CTFontGetBoundingBox(font);
x = (int)(bbox.size.width*2 + 0.99999999);