0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

Mac: Support disabling antialias. (LC Mi)

This commit is contained in:
Bram Moolenaar
2010-07-17 16:44:59 +02:00
parent 58f0a1f8e1
commit 76b96fc08b
2 changed files with 21 additions and 2 deletions

View File

@@ -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)
{