From 1345e9f34526e893ad55e903894891dd056b3dab Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Sun, 27 Oct 2024 12:42:11 +0100 Subject: [PATCH] Format renderer font scale code to be actually readable --- src/renderer.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/renderer.c b/src/renderer.c index abd9a35c..38ed486a 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -401,10 +401,8 @@ static int font_set_face_metrics(RenFont *font, FT_Face face) { font->face = face; if(FT_IS_SCALABLE(face)) { - font->height = (short)((face->height / (float)face->units_per_EM) * font->size); - font->baseline = (short)((face->ascender / (float)face->units_per_EM) * font->size); - - if(FT_IS_SCALABLE(face)) + font->height = (short)((face->height / (float)face->units_per_EM) * font->size); + font->baseline = (short)((face->ascender / (float)face->units_per_EM) * font->size); font->underline_thickness = (unsigned short)((face->underline_thickness / (float)face->units_per_EM) * font->size); } else { font->height = (short) font->face->size->metrics.height / 64.0f;