font/freetype: Enable bitmap glyphs for non-color faces

This allows for crisp bitmap font rendering once again.
This commit is contained in:
sin-ack
2024-12-29 02:08:25 +00:00
parent bfde326bcb
commit ea8fe9a4b0

View File

@ -288,7 +288,6 @@ pub const Face = struct {
self.face.loadGlyph(glyph_id, .{
.render = true,
.color = self.face.hasColor(),
.no_bitmap = !self.face.hasColor(),
}) catch return false;
// If the glyph is SVG we assume colorized
@ -323,14 +322,6 @@ pub const Face = struct {
// glyph properties before render so we don't render here.
.render = !self.synthetic.bold,
// Disable bitmap strikes for now since it causes issues with
// our cell metrics and rasterization. In the future, this is
// all fixable so we can enable it.
//
// This must be enabled for color faces though because those are
// often colored bitmaps, which we support.
.no_bitmap = !self.face.hasColor(),
// use options from config
.no_hinting = !self.load_flags.hinting,
.force_autohint = !self.load_flags.@"force-autohint",