[Bf-blender-cvs] [72933ebe96a] master: BLF: Correctly Set Default Font Size

Harley Acheson noreply at git.blender.org
Sat Sep 24 17:24:29 CEST 2022


Commit: 72933ebe96a02e96c9740e33d0a3e44d5b6365f1
Author: Harley Acheson
Date:   Sat Sep 24 08:23:36 2022 -0700
Branches: master
https://developer.blender.org/rB72933ebe96a02e96c9740e33d0a3e44d5b6365f1

BLF: Correctly Set Default Font Size

Commit cd1631b17dd0 fails to scale the global_font_size by UI scale in
BLF_set_default. Generally used for simple text output like statistics.

See D16053 for more details.

Differential Revision: https://developer.blender.org/D16053

Own Code

===================================================================

M	source/blender/blenfont/intern/blf_default.c

===================================================================

diff --git a/source/blender/blenfont/intern/blf_default.c b/source/blender/blenfont/intern/blf_default.c
index a521d65fe30..738683284e3 100644
--- a/source/blender/blenfont/intern/blf_default.c
+++ b/source/blender/blenfont/intern/blf_default.c
@@ -45,7 +45,7 @@ int BLF_set_default(void)
 {
   ASSERT_DEFAULT_SET;
 
-  BLF_size(global_font_default, global_font_size);
+  BLF_size(global_font_default, global_font_size * U.dpi_fac);
 
   return global_font_default;
 }



More information about the Bf-blender-cvs mailing list