1
0
Fork 0

Fix #12037: Blurry OpenTTD font on Mac OS.

Remove 0.5 pixel offset, intended to produce better font rendering results but causing our own OpenTTD to be rendered with blurry edges.
pull/12047/head
Peter Nelson 2024-02-09 19:30:44 +00:00
parent 48e7dceb3c
commit 690abbe128
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 1 additions and 2 deletions

View File

@ -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. */