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_font.c')
-rw-r--r--source/blender/blenfont/intern/blf_font.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index cb05c89921e..02b66993c0a 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -53,6 +53,8 @@
#include "BIF_gl.h"
#include "BLF_api.h"
+#include "IMB_colormanagement.h"
+
#include "blf_internal_types.h"
#include "blf_internal.h"
@@ -245,11 +247,12 @@ void blf_font_buffer(FontBLF *font, const char *str)
blf_font_ensure_ascii_table(font);
/* another buffer specific call for color conversion */
- if (buf_info->do_color_management) {
- srgb_to_linearrgb_v4(b_col_float, buf_info->col);
+ if (buf_info->display) {
+ copy_v4_v4(b_col_float, buf_info->col);
+ IMB_colormanagement_display_to_scene_linear_v3(b_col_float, buf_info->display);
}
else {
- copy_v4_v4(b_col_float, buf_info->col);
+ srgb_to_linearrgb_v4(b_col_float, buf_info->col);
}
while (str[i]) {