mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
cast dpi to int again
forgot to change this back when I reverted the dpi from f32 to u16
This commit is contained in:
@ -321,8 +321,8 @@ pub fn init(
|
|||||||
// The font size we desire along with the DPI determined for the surface
|
// The font size we desire along with the DPI determined for the surface
|
||||||
const font_size: font.face.DesiredSize = .{
|
const font_size: font.face.DesiredSize = .{
|
||||||
.points = config.@"font-size",
|
.points = config.@"font-size",
|
||||||
.xdpi = x_dpi,
|
.xdpi = @intFromFloat(x_dpi),
|
||||||
.ydpi = y_dpi,
|
.ydpi = @intFromFloat(y_dpi),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Setup our font group. This will reuse an existing font group if
|
// Setup our font group. This will reuse an existing font group if
|
||||||
@ -1703,8 +1703,8 @@ pub fn contentScaleCallback(self: *Surface, content_scale: apprt.ContentScale) !
|
|||||||
// Update our font size which is dependent on the DPI
|
// Update our font size which is dependent on the DPI
|
||||||
const size = size: {
|
const size = size: {
|
||||||
var size = self.font_size;
|
var size = self.font_size;
|
||||||
size.xdpi = x_dpi;
|
size.xdpi = @intFromFloat(x_dpi);
|
||||||
size.ydpi = y_dpi;
|
size.ydpi = @intFromFloat(y_dpi);
|
||||||
break :size size;
|
break :size size;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user