fix off by one error

This commit is contained in:
Felix Kratz 2022-06-16 09:05:47 +02:00
parent aed26e151e
commit 38ea94868f

View file

@ -100,7 +100,7 @@ void text_prepare_line(struct text* text) {
text->bounds = CTLineGetBoundsWithOptions(text->line.line,
kCTLineBoundsUseGlyphPathBounds);
text->bounds.size.width = (uint32_t) (text->bounds.size.width + 0.5);
text->bounds.size.width = (uint32_t) (text->bounds.size.width + 1.5);
text->bounds.size.height = (uint32_t) (text->bounds.size.height + 0.5);
text->bounds.origin.x = (uint32_t) (text->bounds.origin.x + 0.5);
text->line.color = text->highlight ? text->highlight_color : text->color;