mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 08:16:13 +03:00
Use scalable check rather than fixed size check for setting char size
This commit is contained in:
@ -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");
|
||||
|
@ -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());
|
||||
|
Reference in New Issue
Block a user