mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 19:15:14 -04:00
Entity names shouldn't be DPI scaled (Thanks jviteo2005)
This commit is contained in:
parent
44ddfb2801
commit
05bc88da4b
@ -235,9 +235,12 @@ static void MakeNameTexture(struct Entity* e) {
|
|||||||
int width, height;
|
int width, height;
|
||||||
cc_string name;
|
cc_string name;
|
||||||
|
|
||||||
/* Names are always drawn not using the system font */
|
/* Names are always drawn using default.png font */
|
||||||
name = String_FromRawArray(e->NameRaw);
|
|
||||||
Drawer2D_MakeBitmappedFont(&font, 24, FONT_FLAGS_NONE);
|
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);
|
DrawTextArgs_Make(&args, &name, &font, false);
|
||||||
width = Drawer2D_TextWidth(&args);
|
width = Drawer2D_TextWidth(&args);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user