From ea8fe9a4b0c438c3421ad030e70435a4efb65929 Mon Sep 17 00:00:00 2001 From: sin-ack Date: Sun, 29 Dec 2024 02:08:25 +0000 Subject: [PATCH] font/freetype: Enable bitmap glyphs for non-color faces This allows for crisp bitmap font rendering once again. --- src/font/face/freetype.zig | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/font/face/freetype.zig b/src/font/face/freetype.zig index bc503a3af..3f180ad68 100644 --- a/src/font/face/freetype.zig +++ b/src/font/face/freetype.zig @@ -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",