Fix #12037: Blurry OpenTTD font on Mac OS. (#12047)

pull/661/head
Peter Nelson 4 months ago committed by GitHub
parent 48e7dceb3c
commit 466e6bb524
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save