font/freetype: pass monochrome load flag when needed

The monochrome hinter is very aggressive but makes text actually look
tolerable when rendered in monochrome. If for some god forsaken reason
we get complaints about this, that someone wanted improperly hinted mono
glyphs, we can introduce additonal configuration; but for now, this is
just a straight improvement.
pull/8206/head
Qwerasd 2025-08-10 16:04:54 -06:00
parent 20a9a3a8c2
commit 5383cd9c9c
1 changed files with 5 additions and 0 deletions

View File

@ -356,6 +356,11 @@ pub const Face = struct {
.force_autohint = self.load_flags.@"force-autohint",
.no_autohint = !self.load_flags.autohint,
// 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,
// NO_SVG set to true because we don't currently support rendering
// SVG glyphs under FreeType, since that requires bundling another
// dependency to handle rendering the SVG.