diff --git a/pkg/macos/text/font.zig b/pkg/macos/text/font.zig index 5ff031183..cf24bc5d0 100644 --- a/pkg/macos/text/font.zig +++ b/pkg/macos/text/font.zig @@ -132,11 +132,11 @@ pub const Font = opaque { } pub fn getUnitsPerEm(self: *Font) u32 { - return c.CTFontGetUnitsPerEm(@ptrCast(c.CTFontRef, self)); + return c.CTFontGetUnitsPerEm(@ptrCast(self)); } pub fn getSize(self: *Font) f64 { - return c.CTFontGetSize(@ptrCast(c.CTFontRef, self)); + return c.CTFontGetSize(@ptrCast(self)); } }; diff --git a/src/font/face/coretext.zig b/src/font/face/coretext.zig index 86bbca747..58bbddac9 100644 --- a/src/font/face/coretext.zig +++ b/src/font/face/coretext.zig @@ -144,7 +144,7 @@ pub const Face = struct { // TODO(mitchellh): color is going to require a depth here var buf = try alloc.alloc(u8, width * height); defer alloc.free(buf); - std.mem.set(u8, buf, 0); + @memset(buf, 0); const space = try macos.graphics.ColorSpace.createDeviceGray(); defer space.release(); @@ -166,8 +166,8 @@ pub const Face = struct { ctx.fillRect(.{ .origin = .{ .x = 0, .y = 0 }, .size = .{ - .width = @intToFloat(f64, width), - .height = @intToFloat(f64, height), + .width = @floatFromInt(width), + .height = @floatFromInt(height), }, });