shithub: cstory

Download patch

ref: 34d3b8e664b3bc1a8e922526c2ac4459d4b552ba
parent: df42d9300f270d52ab3483c57dd2c614852f24f9
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sun Sep 6 15:40:57 EDT 2020

Improve font rendering

This change fixes uneven glyph heights

--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -968,7 +968,7 @@
 		{
 			glyph->unicode_value = unicode_value;
 			glyph->x = font_object->face->glyph->bitmap_left;
-			glyph->y = (FT_MulFix(font_object->face->ascender, font_object->face->size->metrics.y_scale) - font_object->face->glyph->metrics.horiBearingY + (64 / 2)) / 64;
+			glyph->y = (FT_MulFix(font_object->face->ascender, font_object->face->size->metrics.y_scale) + (64 / 2)) / 64 - font_object->face->glyph->bitmap_top;
 			glyph->x_advance = font_object->face->glyph->advance.x / 64;
 
 			FT_Bitmap bitmap;