Font preview is grey on a white background #60415

Closed
opened 2019-01-11 09:53:59 +01:00 by Paul McManus · 7 comments

System Information
Operating system: Windows 10
Graphics card: GTX1080

Blender Version
Broken: 2.80, f98e4cbedb, 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.

**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.
Author

Added subscriber: @PaulMcManus

Added subscriber: @PaulMcManus
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Philipp Oeser self-assigned this 2019-01-11 10:15:21 +01:00
Member

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

Not striclty a bug, but confirming for now and checking...
Philipp Oeser removed their assignment 2019-01-11 14:57:23 +01:00
Brecht Van Lommel was assigned by Philipp Oeser 2019-01-11 14:57:23 +01:00
Member

Added subscriber: @brecht

Added subscriber: @brecht
Member

caused by 7e7657da29

@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...

P890: #60415 snippet



diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 4b2486f2a68..2c88ddb546d 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -389,10 +389,11 @@ static void file_draw_preview(
 	/* the image */
 	if (!is_icon && typeflags & FILE_TYPE_FTFONT) {
 		UI_GetThemeColor4fv(TH_TEXT, col);
+		GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
+	}
+	else {
+		GPU_blend_set_func_separate(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
 	}
-
-	/* Preview images use premultiplied alpha. */
-	GPU_blend_set_func_separate(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
 
 	IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
 	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...)

caused by 7e7657da29 @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... [P890: #60415 snippet](https://archive.blender.org/developer/P890.txt) ``` diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 4b2486f2a68..2c88ddb546d 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -389,10 +389,11 @@ static void file_draw_preview( /* the image */ if (!is_icon && typeflags & FILE_TYPE_FTFONT) { UI_GetThemeColor4fv(TH_TEXT, col); + GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); + } + else { + GPU_blend_set_func_separate(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); } - - /* Preview images use premultiplied alpha. */ - GPU_blend_set_func_separate(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA); IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR); 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...)

This issue was referenced by 6abbab5b53

This issue was referenced by 6abbab5b5396a84a8f3169135f5937d76d3dcb6f

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#60415
No description provided.