fontsrv: disable font smoothing on osx (#196)

macOS Mojave version 10.14 starts to disable font smoothing.
We disable font smoothing for OSX_VERSION >= 101400 to match the
system default font rendering.
It also makes the font rendering on macOS similar to that on X11.
This commit is contained in:
Xiao-Yong 2018-11-13 22:09:59 -06:00 committed by Russ Cox
parent 014fd65a5c
commit 2419c93438
2 changed files with 4 additions and 0 deletions

View file

@ -1,4 +1,5 @@
<$PLAN9/src/mkhdr
<|osxvers
<|sh ../devdraw/mkwsysrules.sh
<|sh freetyperules.sh $WSYSTYPE $X11H

View file

@ -277,6 +277,9 @@ mksubfont(XFont *f, char *name, int lo, int hi, int size, int antialias)
CGContextSetAllowsAntialiasing(ctxt, antialias);
CGContextSetTextPosition(ctxt, 0, 0); // XXX
#if OSX_VERSION >= 101400
CGContextSetAllowsFontSmoothing(ctxt, false);
#endif
x = 0;
for(i=lo; i<=hi; i++, fc++) {