From 13d953f2de8d9d4aed97364a21248e82de986577 Mon Sep 17 00:00:00 2001 From: onsatoci <38791383+onsatoci@users.noreply.github.com> Date: Sat, 8 Nov 2025 22:28:41 +0100 Subject: [PATCH] add setPixelSize --- face.zig | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/face.zig b/face.zig index 8bbc756..87522c8 100644 --- a/face.zig +++ b/face.zig @@ -72,6 +72,19 @@ pub const Face = struct { )); } + /// Call FT_Request_Size to request the nominal size (in pixels). + pub fn setPixelSize( + self: Face, + pixel_width: u16, + pixel_height: u16, + ) Error!void { + return intToError(c.FT_Set_Pixel_Sizes( + self.handle, + pixel_width, + pixel_height, + )); + } + /// Select a bitmap strike. To be more precise, this function sets the /// scaling factors of the active FT_Size object in a face so that bitmaps /// from this particular strike are taken by FT_Load_Glyph and friends.