From a39fe6baed415acce320941488bbbd1ee61ecb1c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 16 Oct 2022 20:55:06 -0700 Subject: [PATCH] Use scalable check rather than fixed size check for setting char size --- src/Window.zig | 2 +- src/font/face/freetype.zig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Window.zig b/src/Window.zig index 9696af2a7..2680ebd27 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -1902,7 +1902,7 @@ pub fn invokeCharset( self.terminal.invokeCharset(active, slot, single); } -const face_ttf = @embedFile("font/res/Monaco-Regular.ttf"); +const face_ttf = @embedFile("font/res/FiraCode-Regular.ttf"); const face_bold_ttf = @embedFile("font/res/FiraCode-Bold.ttf"); const face_emoji_ttf = @embedFile("font/res/NotoColorEmoji.ttf"); const face_emoji_text_ttf = @embedFile("font/res/NotoEmoji-Regular.ttf"); diff --git a/src/font/face/freetype.zig b/src/font/face/freetype.zig index e168d50da..0bc7a9953 100644 --- a/src/font/face/freetype.zig +++ b/src/font/face/freetype.zig @@ -80,7 +80,7 @@ pub const Face = struct { // If we have fixed sizes, we just have to try to pick the one closest // to what the user requested. Otherwise, we can choose an arbitrary // pixel size. - if (!face.hasFixedSizes()) { + if (face.isScalable()) { const size_26dot6 = @intCast(i32, size.points << 6); // mult by 64 try face.setCharSize(0, size_26dot6, size.xdpi, size.ydpi); } else try selectSizeNearest(face, size.pixels());