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.
This commit is contained in:
Qwerasd
2025-07-05 20:40:12 -06:00
parent fff16bff69
commit 02d82720d2
2 changed files with 3 additions and 3 deletions

View File

@ -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,
};

View File

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