Open Bug 1345399 Opened 7 years ago Updated 2 years ago

GDI font exceptions have gone

Categories

(Core :: Graphics: Text, defect, P3)

52 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: mercury13, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [gfx-noted])

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170302120751

Steps to reproduce:

Update to 52.0
Open any site with Arial as main font (e.g. posmotre.li)


Actual results:

What? Anti-aliasing?


Expected results:

Should be no AA, as in v51.
Component: Untriaged → Graphics: Text
Product: Firefox → Core
Could you add a screenshot of the font rendering please.

In addition, type about:support in the location bar and paste the section "graphics".
Flags: needinfo?(mercury13)
Screenshots are here: https://yadi.sk/d/VIUmU5l33FNEYt

52:

Compositing	Direct3D 11
Asynchronous Pan/Zoom	none
WebGL Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 750 Ti Direct3D11 vs_5_0 ps_5_0)
WebGL2 Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 750 Ti Direct3D11 vs_5_0 ps_5_0)
Hardware H264 Decoding	Yes; Using D3D9 API
Audio Backend	wasapi
DirectWrite	false (6.1.7601.17514)
GPU #1
Active	Yes
Description	NVIDIA GeForce GTX 750 Ti
Vendor ID	0x10de
Device ID	0x1380
Driver Version	21.21.13.7633
Driver Date	12-11-2016
Drivers	nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Subsys ID	362d1458
RAM	2048
Diagnostics
ClearType Parameters	Gamma: 2,2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 100
AzureCanvasAccelerated	0
AzureCanvasBackend	skia
AzureContentBackend	skia
AzureFallbackCanvasBackend	cairo
ClearType Parameters	Gamma: 2,2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 100
Decision Log
D3D9_COMPOSITING	
disabled by default: Disabled by default
DIRECT2D	
unavailable by runtime: Failed to acquire a Direct2D 1.1 factory
Same from 51:

Features
Compositing	Direct3D 11
Asynchronous Pan/Zoom	none
WebGL Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 750 Ti Direct3D11 vs_5_0 ps_5_0)
WebGL2 Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 750 Ti Direct3D11 vs_5_0 ps_5_0)
Hardware H264 Decoding	Yes; Using D3D9 API
Audio Backend	wasapi
DirectWrite	false (6.1.7601.17514)
GPU #1
Active	Yes
Description	NVIDIA GeForce GTX 750 Ti
Vendor ID	0x10de
Device ID	0x1380
Driver Version	21.21.13.7633
Driver Date	12-11-2016
Drivers	nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Subsys ID	362d1458
RAM	2048
Diagnostics
ClearType Parameters	Gamma: 2,2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 100
AzureCanvasAccelerated	0
AzureCanvasBackend	skia
AzureContentBackend	cairo
AzureFallbackCanvasBackend	cairo
ClearType Parameters	Gamma: 2,2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 100
Decision Log
D3D9_COMPOSITING	
disabled by default: Disabled by default
DIRECT2D	
unavailable by runtime: Failed to acquire a Direct2D 1.1 factory
We’re people with good vision, sometimes poor laptops and large pixels visible with bare eyes. And we remember Windows 98 or 2000. We just dislike anti-aliasing.
We aren’t numerous, but we exist. When Chromium stopped GDI, we moved to Firefox. And when Firefox stopped… then we don’t know.
The difference for FF52 is here: "AzureContentBackend	skia".

So probably another regression from bug 1007702.
Blocks: skia-windows
Keywords: regression
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
I'm not sure what we can do here. Skia uses dwrite fonts instead of GDI fonts, so that will probably explain a big difference. Same with the grayscale AA fonts don't look exactly like they did before since there's no clean way to get grayscale AA fonts without using d2d, but that's a 10x performance hit.
I’m not saying about “old AA vs new AA” (new AA is IMHO better, at least when ClearType is off). I’m saying about “GDI vs AA”. Many years ago you’ve chosen a right compromise between GDI and AA: a few old fonts like Arial and Tahoma use GDI, the rest are AA’ed.
(In reply to mercury13 from comment #7)
> I’m not saying about “old AA vs new AA” (new AA is IMHO better, at least
> when ClearType is off). I’m saying about “GDI vs AA”. Many years ago you’ve
> chosen a right compromise between GDI and AA: a few old fonts like Arial and
> Tahoma use GDI, the rest are AA’ed.

We still render with GDI compatibility mode for these fonts. But it's still a dwrite font with a GDI hint that tells dwrite to render it like the old style, versus cairo would use the actual GDI font. GDI and AA are independent of each other. We have dwrite / GDI fonts. Then for each one, you can AA or subpixel AA. Since Skia uses dwrite fonts, we actually try to match d2d, not cairo. However since you don't have d2d, it really means you're seeing the difference between dwrite and gdi fonts. 

Are you on windows 7?
reporter, you can tryout changing `gfx.content.azure.backends` to `direct2d1.1,cairo,skia` (move skia to the end). 
(go to about:config, find gfx.content.azure.backends and replace its value.)

i think this might help you restore the old behavior.
Thanks, that worked.
How long will you support this backend for? Or, maybe, you’ll add something interesting to Skia?
(In reply to mercury13 from comment #10)
> Thanks, that worked.
> How long will you support this backend for? 

see bug 1298484 comment 23 and bug bug 1298484 comment 26.

if i understand those comments correctly, in the future people will get used to living with _skia_ and forget GDI font rendering. :(
Maybe, when a small letter becomes larger than 5px.
On 9" FullHD Android tab there’s no point to complain :)
Another question. Is it possible to force ClearType, even if it’s off in the system?
…Under Skia, of course?
One more question. Under Win10 everything is right, out of the box. Is this because of another backend (Direct2d)?
This is my work computer, Win10, ClearType is off too.

Compositing	Direct3D 11
Asynchronous Pan/Zoom	none
WebGL Renderer	Google Inc. -- ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0)
WebGL2 Renderer	Google Inc. -- ANGLE (Intel(R) HD Graphics 4600 Direct3D11 vs_5_0 ps_5_0)
Hardware H264 Decoding	Yes; Using D3D11 API
Audio Backend	wasapi
Direct2D	true
DirectWrite	true (10.0.14393.351)
GPU #1
Active	Yes
Description	Intel(R) HD Graphics 4600
Vendor ID	0x8086
Device ID	0x0412
Driver Version	20.19.15.4531
Driver Date	9-29-2016
Drivers	igdumdim64 igd10iumd64 igd10iumd64 igd12umd64 igdumdim32 igd10iumd32 igd10iumd32 igd12umd32
Subsys ID	7ecf1019
RAM	Unknown
Diagnostics
ClearType Parameters	Gamma: 2,2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 0
AzureCanvasAccelerated	0
AzureCanvasBackend	direct2d 1.1
AzureContentBackend	direct2d 1.1
AzureFallbackCanvasBackend	cairo
ClearType Parameters	Gamma: 2,2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 0
Decision Log
D3D9_COMPOSITING	
disabled by default: Disabled by default
Yes, this is because you are on d2d. I'm not sure what you mean by everything is right?

I don't think there is a way to force enable cleartype if it's off. We look at the system settings to determine cleartype. 

Also yes, Skia is the default instead of cairo and cairo will stop working eventually.
(In reply to Mason Chang [:mchang] from comment #17)
> Yes, this is because you are on d2d. I'm not sure what you mean by
> everything is right?
I turned off ClearType — no AA. On Monday I can add a render of Direct2D.

> I don't think there is a way to force enable cleartype if it's off. We look
> at the system settings to determine cleartype. 
Thanks. As for me, the best way possible is a pixelated text where it’s present, and ClearType where there’s none. Dreams, dreams… You’ve got an excellent job with Skia, but got rid of that pixelated text — maybe, it’s possible?

> Also yes, Skia is the default instead of cairo and cairo will stop working
> eventually.
I understand. That’s why I ask for how long it’ll be supported.
(In reply to Mason Chang [:mchang] from comment #8)
> Since Skia uses dwrite fonts, we actually try to
> match d2d, not cairo. However since you don't have d2d, it really means
> you're seeing the difference between dwrite and gdi fonts. 
You’ve failed a bit when there’s no ClearType. Direct2D fails sometimes with inter-character spacing, bot mostly it gets old pixelated GDI fonts.
I’ve made a screenshot of Win10 when CT=off, backend=Direct2D. See the same address.

https://yadi.sk/d/VIUmU5l33FNEYt
See Also: → 1322897
Return backend order to “d2d, skia”, right?
The same.
Screenshot is at the same address https://yadi.sk/d/VIUmU5l33FNEYt, file 52a1.png
sorry, 55a1.png
(In reply to mercury13 from comment #22)
> Return backend order to “d2d, skia”, right?

Return it to skia.
(In reply to Mason Chang [:mchang] from comment #25)
> (In reply to mercury13 from comment #22)
> > Return backend order to “d2d, skia”, right?
> 
> Return it to skia.

Sorry it's really hard to tell via screenshots. Unless they are exactly the same size screenshots, I can't tell the difference between fonts since I have to alt-tab between them to spot differences. I tried this locally on windows 10 and cleartye disabled and noticed these things:

1) The font difference between d2d / cairo exists and they are quite different already. These are not equal in either appearance or spacing. This should be gecko 51.
2) There is a spacing difference between d2d / skia, but the fonts rendered themselves look mostly the same.

I don't quite know what you mean by pixelated text here. 

Are #1 and #2 correct to you? If so, which problem do you have here?

Thanks
51. Used to be. The same in 52 when I put Cairo before Skia.
52. Stable version.
55a1. Nightly build. Same as 52.
52_Win10_noCT. 52, Windows 10, no ClearType. Nothing changed since 51. Sorry, another size, another OS, another computer.
You see pixelated fonts in “51” and “52_Win10_NoCT”.
(In reply to mercury13 from comment #27)
> 51. Used to be. The same in 52 when I put Cairo before Skia.
> 52. Stable version.
> 55a1. Nightly build. Same as 52.
> 52_Win10_noCT. 52, Windows 10, no ClearType. Nothing changed since 51.
> Sorry, another size, another OS, another computer.

Yeah I'm not sure. Can you please confirm #1 and #2 from comment 26?

You're saying Windows 10 with Cleartype disabled and d2d is equal to cairo from 51?
> 1) The font difference between d2d / cairo exists and they are quite different already. These are not equal in
> either appearance or spacing. This should be gecko 51.
> 2) There is a spacing difference between d2d / skia, but the fonts rendered themselves look mostly the same.
Sorry, no d2d in Win7. I’ll try in Win10 tomorrow. If there are some weird renders, I’ll write.
Of course, you need to test FF on fonts that are marked as GDI fallbacks: Arial, Tahoma, etc.
And, of course, AA is MUCH better in Skia than in Cairo.
> You're saying Windows 10 with Cleartype disabled and d2d is equal to cairo from 51?
Yes, mostly (there are some rare bugs with inter-character spacing).
(In reply to mercury13 from comment #33)
> > You're saying Windows 10 with Cleartype disabled and d2d is equal to cairo from 51?
> Yes, mostly (there are some rare bugs with inter-character spacing).

I can't reproduce this at all. They look very different to me. I wonder if it has to do with the windows cleartype font tuner when you disable cleartype. How are you disabling cleartype?
I don’t even know. Just disabled ClearType via Windows GUI and set system font to Tahoma vis registry. That’s all.
Of course, you don’t need the second part.
Whiteboard: [gfx-noted]
Thank you. What I see in 59.0.1 x64. GDI returned, but works badly, regardless of backend.
In Windows 7 Direct2D appeared, with lots of inter-character spacing problems (much more than on Windows 10).
Compositing	Direct3D 11
Asynchronous Pan/Zoom	wheel input enabled; scrollbar drag enabled; keyboard enabled; autoscroll enabled
WebGL 1 Driver WSI Info	EGL_VENDOR: Google Inc. (adapter LUID: 00000000000087a5)
EGL_VERSION: 1.4 (ANGLE 2.1.0.db3422764a9b)
EGL_EXTENSIONS: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_d3d_texture_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXT_pixel_format_float EGL_KHR_surfaceless_context EGL_ANGLE_display_texture_share_group EGL_ANGLE_create_context_client_arrays EGL_ANGLE_program_cache_control 
EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses EGL_ANGLE_display_robust_resource_initialization 
WebGL 1 Driver Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 750 Ti Direct3D11 vs_5_0 ps_5_0)
WebGL 1 Driver Version	OpenGL ES 2.0 (ANGLE 2.1.0.db3422764a9b)
WebGL 1 Driver Extensions	GL_ANGLE_client_arrays GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_pack_reverse_row_order GL_ANGLE_program_cache_control GL_ANGLE_request_extension GL_ANGLE_robust_client_memory GL_ANGLE_robust_resource_initialization GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_CHROMIUM_bind_generates_resource GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_color_buffer_float_rgb GL_CHROMIUM_color_buffer_float_rgba GL_CHROMIUM_copy_compressed_texture GL_CHROMIUM_copy_texture GL_CHROMIUM_sync_query GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_frag_depth GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_read_format_bgra GL_EXT_robustness GL_EXT_sRGB GL_EXT_shader_texture_lod GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc_srgb GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_storage GL_EXT_unpack_subimage GL_KHR_debug GL_NV_EGL_stream_consumer_external GL_NV_fence GL_NV_pack_subimage GL_NV_pixel_buffer_object GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth32 GL_OES_element_index_uint GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_surfaceless_context GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_array_object 
WebGL 1 Extensions	ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_frag_depth EXT_sRGB EXT_shader_texture_lod EXT_texture_filter_anisotropic EXT_disjoint_timer_query OES_element_index_uint OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context
WebGL 2 Driver WSI Info	EGL_VENDOR: Google Inc. (adapter LUID: 00000000000087a5)
EGL_VERSION: 1.4 (ANGLE 2.1.0.db3422764a9b)
EGL_EXTENSIONS: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_d3d_texture_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXT_pixel_format_float EGL_KHR_surfaceless_context EGL_ANGLE_display_texture_share_group EGL_ANGLE_create_context_client_arrays EGL_ANGLE_program_cache_control 
EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses EGL_ANGLE_display_robust_resource_initialization 
WebGL 2 Driver Renderer	Google Inc. -- ANGLE (NVIDIA GeForce GTX 750 Ti Direct3D11 vs_5_0 ps_5_0)
WebGL 2 Driver Version	OpenGL ES 3.0 (ANGLE 2.1.0.db3422764a9b)
WebGL 2 Driver Extensions	GL_ANGLE_client_arrays GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_multiview GL_ANGLE_pack_reverse_row_order GL_ANGLE_program_cache_control GL_ANGLE_request_extension GL_ANGLE_robust_client_memory GL_ANGLE_robust_resource_initialization GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_CHROMIUM_bind_generates_resource GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_color_buffer_float_rgb GL_CHROMIUM_color_buffer_float_rgba GL_CHROMIUM_copy_compressed_texture GL_CHROMIUM_copy_texture GL_CHROMIUM_sync_query GL_EXT_blend_minmax GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_frag_depth GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_read_format_bgra GL_EXT_robustness GL_EXT_sRGB GL_EXT_shader_texture_lod GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc_srgb GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_norm16 GL_EXT_texture_rg GL_EXT_texture_storage GL_EXT_unpack_subimage GL_KHR_debug GL_NV_EGL_stream_consumer_external GL_NV_fence GL_NV_pack_subimage GL_NV_pixel_buffer_object GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth32 GL_OES_element_index_uint GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_surfaceless_context GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_array_object 
WebGL 2 Extensions	EXT_color_buffer_float EXT_texture_filter_anisotropic EXT_disjoint_timer_query OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context
Direct2D	true
Off Main Thread Painting Enabled	true
DirectWrite	true (6.2.9200.22082)
GPU #1
Active	Yes
Description	NVIDIA GeForce GTX 750 Ti
Vendor ID	0x10de
Device ID	0x1380
Driver Version	23.21.13.8813
Driver Date	10-27-2017
Drivers	nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Subsys ID	362d1458
RAM	2048
Diagnostics
ClearType Parameters	Gamma: 2,2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 50 
AzureCanvasAccelerated	0
AzureCanvasBackend	Direct2D 1.1
AzureCanvasBackend (UI Process)	skia
AzureContentBackend	Direct2D 1.1
AzureContentBackend (UI Process)	skia
AzureFallbackCanvasBackend (UI Process)	cairo
GPUProcessPid	1284
ClearType Parameters	Gamma: 2,2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 50 
Decision Log
WEBRENDER	
opt-in by default: WebRender is an opt-in feature
unavailable by runtime: Build doesn't include WebRender
ADVANCED_LAYERS	
available by user: Enabled for Windows 7 via user-preference
Blocklisted due to known issues; bug 1419264
Flags: needinfo?(mercury13)
Works for me since 59.0.2!
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.