shithub: cstory

Download patch

ref: 5e7f514b6f4d8474f2ed82550f1db37436835e66
parent: 5b33d0280dae5a4639f07bb5fb375704db3b7b8f
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Sep 12 20:14:51 EDT 2020

Hopefully fix font atlas pixel bleeding

--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -1077,8 +1077,8 @@
 
 					font_object->glyph_list_head = NULL;
 
-					size_t atlas_entry_width = FT_MulFix(font_object->face->bbox.xMax - font_object->face->bbox.xMin, font_object->face->size->metrics.x_scale) / 64;
-					size_t atlas_entry_height = FT_MulFix(font_object->face->bbox.yMax - font_object->face->bbox.yMin, font_object->face->size->metrics.y_scale) / 64;
+					size_t atlas_entry_width = FT_MulFix(font_object->face->bbox.xMax - font_object->face->bbox.xMin + 1, font_object->face->size->metrics.x_scale) / 64;
+					size_t atlas_entry_height = FT_MulFix(font_object->face->bbox.yMax - font_object->face->bbox.yMin + 1, font_object->face->size->metrics.y_scale) / 64;
 
 					font_object->atlas_row_length = ceil(sqrt(atlas_entry_width * atlas_entry_height * TOTAL_GLYPH_SLOTS) / atlas_entry_width);