From 61b964b9586e53fa8ec5896c8d03a6ae9a6cebe1 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 1 Feb 2024 08:40:18 -0800 Subject: [PATCH] font/freetype: enable bitmap loading for colored faces --- src/font/face/freetype.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/font/face/freetype.zig b/src/font/face/freetype.zig index f130b409e..5a8c69dfa 100644 --- a/src/font/face/freetype.zig +++ b/src/font/face/freetype.zig @@ -236,7 +236,10 @@ pub const Face = struct { // 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. - .no_bitmap = true, + // + // This must be enabled for color faces though because those are + // often colored bitmaps, which we support. + .no_bitmap = !self.face.hasColor(), }); const glyph = self.face.handle.*.glyph;