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

@@ -158,8 +158,8 @@ pub const Action = union(enum) {
paste_from_selection: void,
/// Increase/decrease the font size by a certain amount.
increase_font_size: u8,
decrease_font_size: u8,
increase_font_size: f32,
decrease_font_size: f32,
/// Reset the font size to the original configured size.
reset_font_size: void,