feat(font): Non-integer point sizes

Allows for high dpi displays to get odd numbered pixel sizes, for
example, 13.5pt @ 2px/pt for 27px font. This implementation performs
all the sizing calculations with f32, rounding to the nearest pixel
size when it comes to rendering. In the future this can be enhanced
by adding fractional scaling to support fractional pixel sizes.
This commit is contained in:
Qwerasd
2024-05-08 14:23:20 -04:00
parent 08940940d5
commit d4a7549222
7 changed files with 30 additions and 23 deletions

View File

@@ -250,8 +250,10 @@ fn parseIntoField(
0,
) catch return error.InvalidValue,
f64 => std.fmt.parseFloat(
f64,
f32,
f64,
=> |Float| std.fmt.parseFloat(
Float,
value orelse return error.ValueRequired,
) catch return error.InvalidValue,