Skip to content

Commit

Permalink
(continuation)
Browse files Browse the repository at this point in the history
  • Loading branch information
William Bérubé committed Apr 22, 2024
1 parent 8ae78da commit 343ea6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osd/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ RECT measure_text(const char *font, double size, const char *text)
calcdim(&margin, &height, &width, text);
// Some platforms operate with a coarse pixel size of 2x2
// and rounding up is required for a sufficient canvas size
RECT rect = { .height = ceil(height + (height & 1)), .width = ceil(width + (width & 1)) };
RECT rect = { .height = ceil(height), .width = ceil(width) };
rect.height += rect.height & 1;
rect.width += rect.width & 1;

sft_freefont(sft.font);
return rect;
Expand Down

0 comments on commit 343ea6e

Please sign in to comment.