Page MenuHome

Font preview is grey on a white background
Closed, ResolvedPublic

Description

System Information
Operating system: Windows 10
Graphics card: GTX1080

Blender Version
Broken: 2.80, f98e4cbedbb7, blender2.7, 2019-01-11
Worked: build from 3 days ago

Launch Blender; drop a text object into the screen; select the Font property and browse to a folder containing font files; select the preview mode.

Font preview shows font styles in light grey on a white background. Legibility is greatly reduced.

Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Confirmed, Medium priority.Jan 11 2019, 10:15 AM
Philipp Oeser (lichtwerk) claimed this task.

Not striclty a bug, but confirming for now and checking...

caused by rB7e7657da2956

@Brecht Van Lommel (brecht): mind checking? Following [just an exception for the font case] seems to fix, but I would need to check datablock previews more to really know whats going on...

1
2
3diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
4index 4b2486f2a68..2c88ddb546d 100644
5--- a/source/blender/editors/space_file/file_draw.c
6+++ b/source/blender/editors/space_file/file_draw.c
7@@ -389,10 +389,11 @@ static void file_draw_preview(
8 /* the image */
9 if (!is_icon && typeflags & FILE_TYPE_FTFONT) {
10 UI_GetThemeColor4fv(TH_TEXT, col);
11+ GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
12+ }
13+ else {
14+ GPU_blend_set_func_separate(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
15 }
16-
17- /* Preview images use premultiplied alpha. */
18- GPU_blend_set_func_separate(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
19
20 IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
21 immDrawPixelsTexScaled(&state, (float)xco, (float)yco, imb->x, imb->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_NEAREST, imb->rect,

btw.: blendfile previews dont seem to get a proper alpha anymore in 2.8? its black for me where it was transparent in 2.7 [but again: I havent checked in depth...]
(feel free to throw back at me and I will do proper investigation...)