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:
parent
014fd65a5c
commit
2419c93438
2 changed files with 4 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<$PLAN9/src/mkhdr
|
||||
<|osxvers
|
||||
<|sh ../devdraw/mkwsysrules.sh
|
||||
<|sh freetyperules.sh $WSYSTYPE $X11H
|
||||
|
||||
|
|
|
|||
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue