From 466e6bb524d4659785d3089afddb4c0d2062907f Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Fri, 9 Feb 2024 20:36:13 +0000 Subject: [PATCH] Fix #12037: Blurry OpenTTD font on Mac OS. (#12047) --- src/os/macosx/font_osx.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/os/macosx/font_osx.cpp b/src/os/macosx/font_osx.cpp index 2b5f0e14b1..12cf1f9116 100644 --- a/src/os/macosx/font_osx.cpp +++ b/src/os/macosx/font_osx.cpp @@ -263,8 +263,7 @@ const Sprite *CoreTextFontCache::InternalGetGlyph(GlyphID key, bool use_aa) CGContextSetAllowsFontSubpixelQuantization(context.get(), !use_aa); CGContextSetShouldSmoothFonts(context.get(), false); - float offset = 0.5f; // CoreText uses 0.5 as pixel centers. We want pixel alignment. - CGPoint pos{offset - bounds.origin.x, offset - bounds.origin.y}; + CGPoint pos{-bounds.origin.x, -bounds.origin.y}; CTFontDrawGlyphs(this->font.get(), &glyph, &pos, 1, context.get()); /* Draw shadow for medium size. */