plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 2419c9343827a679353a8c0a44fd6e0e3e631a3c
parent 014fd65a5ca780823c0e75787f193d3c6597de8f
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:
Msrc/cmd/fontsrv/mkfile | 1+
Msrc/cmd/fontsrv/osx.c | 3+++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/cmd/fontsrv/mkfile b/src/cmd/fontsrv/mkfile @@ -1,4 +1,5 @@ <$PLAN9/src/mkhdr +<|osxvers <|sh ../devdraw/mkwsysrules.sh <|sh freetyperules.sh $WSYSTYPE $X11H diff --git a/src/cmd/fontsrv/osx.c b/src/cmd/fontsrv/osx.c @@ -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++) {