Open zadjii-msft opened 3 years ago
IntenseIsBold
is always onAlpha blending is broken in grayscale AA mode (dark moire around glyphs with high RGB-contrast between foreground and background). Apparently the transition between linear/sRGB is missing somewhere.
My setup: Current main branch. Windows 10.
pwsh:
"🥵🦚`e[38;2;255;0;0;48;2;0;0;255mtest`e[38;2;0;255;255mtest`e[m"
Grayscale AA mode:
Cleartype AA mode:
Expected grayscale AA mode blending:
Your issue is definitely weird. The blue text background in your two screenshots is #120efd
and not #0000ff
. Why's that? The red "test" text is also #ff0302
and not a clean #ff0000
. Are you sure your screenshot wasn't chroma subsampled (I mean like YUV 4:2:2), or something similar?
In any case, I've tested this with Visual TrueType just now. First I've reset my ClearType settings so that I get a clean 1.8 gamma:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"FontSmoothing"="2"
"FontSmoothingGamma"=dword:00000000
"FontSmoothingOrientation"=dword:00000001
"FontSmoothingType"=dword:00000002
[-HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics]
[-HKEY_LOCAL_MACHINE\Software\Microsoft\Avalon.Graphics]
Then I configured VTT like so:
This got me this:
which is almost identical to what BackendD3D renders for me (if you zoom into the "t"):
The blue text background in your two screenshots is #120efd and not #0000ff. Why's that? The red "test" text is also #ff0302 and not a clean #ff0000. Are you sure your screenshot wasn't chroma subsampled (I mean like YUV 4:2:2), or something similar?
The screenshots were taken via RDP, perhaps there is some kind of post-processing.
Here is a screenshot from localhost:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics]
[HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics\DISPLAY1]
"PixelStructure"=dword:00000002
"GammaLevel"=dword:00000898
"ClearTypeLevel"=dword:00000064
"EnhancedContrastLevel"=dword:00000032
"GrayscaleEnhancedContrastLevel"=dword:00000064
"TextContrastLevel"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Avalon.Graphics\DISPLAY3]
"PixelStructure"=dword:00000002
"GammaLevel"=dword:00000898
"ClearTypeLevel"=dword:00000064
"EnhancedContrastLevel"=dword:00000032
"GrayscaleEnhancedContrastLevel"=dword:00000064
"TextContrastLevel"=dword:00000000
My gamma is 2.2 (GammaLevel=2200), since sRGB-gamma is 2.2 on my local monitors with sRGB mode enabled (PHL234E5, ATI HD 3870).
This got me this...
If you convert your image to shades of gray, you will see overdarkening that, in theory, should not be there:
VTT does not take into account gamma correction with grayscale AA blending (or do it wrong):
Off: VTT has a memory leak: +100 MB of RAM on every (back and forth) window resizing step with "Segoe UI Emoji" open.
Off2: VTT does not allow the gamma correction value to be set to 2250, even though the error message states that the valid range is 1050-2250.
Here is my test image (expected grayscale blending):
Off3: Github breaks colors on pasted screenshots. Pay attention to the red "test" - in both screenshots it is the same image. At low resolution, compression changes color.
I found that the deprecated DxRenderer (if I understand it correctly) GDI-renderer (with UseDx=0
) (thanks to @tusharsnx) is not affected by this issue:
Make sure system-wide cleartype is disabled:
@o-sdn-o Nah, that's the GDI renderer (unless you have used useDX
from the registry).
Bugs
IntenseIsBold
is always onMissing features
New features
Cleanup
UpdateFont()
. BothDxEngine
andAtlasEngine
fall back to Consolas, etc. separately.Things we think were fixed by this renderer...
...Or at least, this renderer got out of the way so that these can be fixed now.
Not really a bug