diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-17 16:44:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-17 16:44:59 +0200 |
commit | 76b96fc08b9bc5ea5651e46dc091f7198c6475ee (patch) | |
tree | 3d01205ee13043962773d7c18abebdb5fed49a2d /src/gui_mac.c | |
parent | 58f0a1f8e1e9c5fa521231c966c484076989476e (diff) | |
download | vim-git-76b96fc08b9bc5ea5651e46dc091f7198c6475ee.tar.gz |
Mac: Support disabling antialias. (LC Mi)
Diffstat (limited to 'src/gui_mac.c')
-rw-r--r-- | src/gui_mac.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui_mac.c b/src/gui_mac.c index 885985763..f6aa22b57 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -173,6 +173,7 @@ ATSUStyle gFontStyle; ATSUStyle gWideFontStyle; # endif Boolean gIsFontFallbackSet; +UInt32 useAntialias_cached = 0x0; #endif /* Colors Macros */ @@ -4123,6 +4124,24 @@ draw_string_ATSUI(int row, int col, char_u *s, int len, int flags) ATSUSetAttributes(gFontStyle, 1, attribTags, attribSizes, attribValues); } + UInt32 useAntialias = p_antialias ? kATSStyleApplyAntiAliasing + : kATSStyleNoAntiAliasing; + if (useAntialias != useAntialias_cached) + { + ATSUAttributeTag attribTags[] = { kATSUStyleRenderingOptionsTag }; + ByteCount attribSizes[] = { sizeof(UInt32) }; + ATSUAttributeValuePtr attribValues[] = { &useAntialias }; + + if (gFontStyle) + ATSUSetAttributes(gFontStyle, 1, attribTags, + attribSizes, attribValues); + if (gWideFontStyle) + ATSUSetAttributes(gWideFontStyle, 1, attribTags, + attribSizes, attribValues); + + useAntialias_cached = useAntialias; + } + #ifdef FEAT_MBYTE if (has_mbyte) { |