cast dpi to int again

forgot to change this back when I reverted the dpi from f32 to u16
This commit is contained in:
Qwerasd
2024-05-08 16:27:14 -04:00
parent fb913f0d9e
commit 575a477be5

View File

@ -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;
}; };