mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-01-10 07:13:26 +00:00
fix(pkg/freetype): fully correct load flags
These now properly match the FreeType API- compared directly in the unit tests against the values provided by the FreeType header itself. This was ridiculously wrong before, like... wow.
This commit is contained in:
@@ -376,11 +376,15 @@ pub const Face = struct {
|
||||
// If we're gonna be rendering this glyph in monochrome,
|
||||
// then we should use the monochrome hinter as well, or
|
||||
// else it won't look very good at all.
|
||||
.target_mono = self.load_flags.monochrome,
|
||||
|
||||
// Otherwise we select hinter based on the `light` flag.
|
||||
.target_normal = !self.load_flags.light and !self.load_flags.monochrome,
|
||||
.target_light = self.load_flags.light and !self.load_flags.monochrome,
|
||||
//
|
||||
// Otherwise if the user asked for light hinting we
|
||||
// use that, otherwise we just use the normal target.
|
||||
.target = if (self.load_flags.monochrome)
|
||||
.mono
|
||||
else if (self.load_flags.light)
|
||||
.light
|
||||
else
|
||||
.normal,
|
||||
|
||||
// NO_SVG set to true because we don't currently support rendering
|
||||
// SVG glyphs under FreeType, since that requires bundling another
|
||||
|
||||
Reference in New Issue
Block a user