tfontsrv: disable font smoothing on osx (#196) - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2419c9343827a679353a8c0a44fd6e0e3e631a3c
 (DIR) parent 014fd65a5ca780823c0e75787f193d3c6597de8f
 (HTM) Author: Xiao-Yong <jinxiaoyong@gmail.com>
       Date:   Tue, 13 Nov 2018 22:09:59 -0600
       
       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.
       Diffstat:
         M src/cmd/fontsrv/mkfile              |       1 +
         M src/cmd/fontsrv/osx.c               |       3 +++
       
       2 files changed, 4 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/src/cmd/fontsrv/mkfile b/src/cmd/fontsrv/mkfile
       t@@ -1,4 +1,5 @@
        <$PLAN9/src/mkhdr
       +<|osxvers
        <|sh ../devdraw/mkwsysrules.sh
        <|sh freetyperules.sh $WSYSTYPE $X11H
        
 (DIR) diff --git a/src/cmd/fontsrv/osx.c b/src/cmd/fontsrv/osx.c
       t@@ -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++) {