From 02d82720d26b222ad0c768d95395d7f4bea864c6 Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Sat, 5 Jul 2025 20:40:12 -0600 Subject: [PATCH] font/freetype: fix negated force-autohint flag The behavior of this flag was the opposite of its description in the docs- luckily, at the same time, the default (true) was the opposite from what the default actually is in freetype, so users who haven't explicitly set this flag won't see a behavior difference from this. --- src/config/Config.zig | 4 ++-- src/font/face/freetype.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/Config.zig b/src/config/Config.zig index 653ce4178..2910372f3 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -435,7 +435,7 @@ pub const compatibility = std.StaticStringMap( /// * `hinting` - Enable or disable hinting. Enabled by default. /// /// * `force-autohint` - Always use the freetype auto-hinter instead of -/// the font's native hinter. Enabled by default. +/// the font's native hinter. Disabled by default. /// /// * `monochrome` - Instructs renderer to use 1-bit monochrome rendering. /// This will disable anti-aliasing, and probably not look very good unless @@ -7084,7 +7084,7 @@ pub const FreetypeLoadFlags = packed struct { // for Freetype itself. Ghostty hasn't made any opinionated changes // to these defaults. hinting: bool = true, - @"force-autohint": bool = true, + @"force-autohint": bool = false, monochrome: bool = false, autohint: bool = true, }; diff --git a/src/font/face/freetype.zig b/src/font/face/freetype.zig index c23ede04a..585d21c5b 100644 --- a/src/font/face/freetype.zig +++ b/src/font/face/freetype.zig @@ -348,7 +348,7 @@ pub const Face = struct { // use options from config .no_hinting = !do_hinting, - .force_autohint = !self.load_flags.@"force-autohint", + .force_autohint = self.load_flags.@"force-autohint", .no_autohint = !self.load_flags.autohint, // NO_SVG set to true because we don't currently support rendering