Mercurial > vim
diff src/gui_mac.c @ 2327:02cf6d461e3f vim73
Mac: Support disabling antialias. (LC Mi)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 17 Jul 2010 16:44:59 +0200 |
parents | cccb71c2c5c1 |
children | da6ec32d8d8f |
line wrap: on
line diff
--- 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 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) {