Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenfont/intern/blf_default.c')
-rw-r--r--source/blender/blenfont/intern/blf_default.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/blenfont/intern/blf_default.c b/source/blender/blenfont/intern/blf_default.c
index a1f1b84636f..a521d65fe30 100644
--- a/source/blender/blenfont/intern/blf_default.c
+++ b/source/blender/blenfont/intern/blf_default.c
@@ -20,15 +20,9 @@
/* Default size and dpi, for BLF_draw_default. */
static int global_font_default = -1;
-static int global_font_dpi = 72;
/* Keep in sync with `UI_DEFAULT_TEXT_POINTS` */
static float global_font_size = 11.0f;
-void BLF_default_dpi(int dpi)
-{
- global_font_dpi = dpi;
-}
-
void BLF_default_size(float size)
{
global_font_size = size;
@@ -51,7 +45,7 @@ int BLF_set_default(void)
{
ASSERT_DEFAULT_SET;
- BLF_size(global_font_default, global_font_size, global_font_dpi);
+ BLF_size(global_font_default, global_font_size);
return global_font_default;
}
@@ -59,7 +53,7 @@ int BLF_set_default(void)
void BLF_draw_default(float x, float y, float z, const char *str, const size_t str_len)
{
ASSERT_DEFAULT_SET;
- BLF_size(global_font_default, global_font_size, global_font_dpi);
+ BLF_size(global_font_default, global_font_size * U.dpi_fac);
BLF_position(global_font_default, x, y, z);
BLF_draw(global_font_default, str, str_len);
}