From a13d8578e0f58c31d84d29e8ada6885a7a838524 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 9 Aug 2022 16:26:28 +0200 Subject: Tweak Label3D defaults for better readability - Increase font size and decrease pixel size. - The font is rendered at the same physical size, but is more detailed, which is visible when the camera is up close. - Add an outline to improve readability on mixed-color backgrounds. - The outline is fairly thick to ensure it doesn't get too grainy at a distance (without requiring MSDF or mipmaps on the default project font). --- doc/classes/Label3D.xml | 6 +++--- scene/3d/label_3d.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/classes/Label3D.xml b/doc/classes/Label3D.xml index 56690d484d..e4dc24d0b5 100644 --- a/doc/classes/Label3D.xml +++ b/doc/classes/Label3D.xml @@ -53,7 +53,7 @@ Font configuration used to display text. - + Font size of the [Label3D]'s text. @@ -82,10 +82,10 @@ [b]Note:[/b] This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). [b]Note:[/b] This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). - + Text outline size. - + The size of one pixel's width on the label to scale it in 3D. diff --git a/scene/3d/label_3d.h b/scene/3d/label_3d.h index 4498e89517..d4bfe743a6 100644 --- a/scene/3d/label_3d.h +++ b/scene/3d/label_3d.h @@ -55,7 +55,7 @@ public: }; private: - real_t pixel_size = 0.01; + real_t pixel_size = 0.005; bool flags[FLAG_MAX] = {}; AlphaCutMode alpha_cut = ALPHA_CUT_DISABLED; float alpha_scissor_threshold = 0.5; @@ -109,7 +109,7 @@ private: TextServer::AutowrapMode autowrap_mode = TextServer::AUTOWRAP_OFF; float width = 500.0; - int font_size = 16; + int font_size = 32; Ref font_override; mutable Ref theme_font; Color modulate = Color(1, 1, 1, 1); @@ -117,7 +117,7 @@ private: int outline_render_priority = -1; int render_priority = 0; - int outline_size = 0; + int outline_size = 12; Color outline_modulate = Color(0, 0, 0, 1); float line_spacing = 0.f; -- cgit v1.2.3