From 05bc88da4b109c7db90d1d8a290fcd936e650b43 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Wed, 18 Nov 2020 19:06:39 +1100 Subject: [PATCH] Entity names shouldn't be DPI scaled (Thanks jviteo2005) --- src/Entity.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Entity.c b/src/Entity.c index 7b176fb41..4421e1441 100644 --- a/src/Entity.c +++ b/src/Entity.c @@ -235,9 +235,12 @@ static void MakeNameTexture(struct Entity* e) { int width, height; cc_string name; - /* Names are always drawn not using the system font */ - name = String_FromRawArray(e->NameRaw); + /* Names are always drawn using default.png font */ Drawer2D_MakeBitmappedFont(&font, 24, FONT_FLAGS_NONE); + /* Don't want DPI scaling or padding */ + font.size = 24; font.height = 24; + + name = String_FromRawArray(e->NameRaw); DrawTextArgs_Make(&args, &name, &font, false); width = Drawer2D_TextWidth(&args);