On Mon, 31 Aug 2026 15:44:14 GMT, Andy Goryachev <[email protected]> wrote:

> I wonder if the results depend on the user preferences, settings -> 
> Personalization -> Fonts -> Adjust ClearType text. You go through a bunch of 
> screens choosing the best looking one each time, though I have no idea what 
> it does.
> 

This tuner is mainly about how "colorful" you like LCD text, and the level of 
contrast.
These two can't be completely disentangled.

More wider filtering will reduce color fringing and also make it more blurry / 
less sharp
Filtering uses the contrast as a pseudo-gamma, and the higher this value, also 
has this effect.
For ClearType,  I am almost 100% sure that DW will do essentially the same 
thing as GDI, although perhaps with different defaults.

This means that if FX does the rendering (it does) it needs to know what the 
system default / user preference is for 'gamma'.

Quite possibly FX uses the GDI way of finding out what that should be (a 
registry value), not the DW one.
A bit of googling points me to CreateMonitorRenderingParams() which gives you a 
IDWriteRenderingParams
https://learn.microsoft.com/en-us/windows/win32/api/dwrite/nn-dwrite-idwriterenderingparams.

It is quite a bit different and richer than GDI, and has a GetRenderingMode() 
API and also points at a GetRecommendedRenderingMode() API
https://learn.microsoft.com/en-us/windows/win32/api/dwrite/nf-dwrite-idwritefontface-getrecommendedrenderingmode

I don't see FX using these APIs and perhaps it should so that it follows what 
the rest of the system would do.
[That may not result in text that a particular user (say Martin) prefers, but 
it would be the best default for the platform].

What's in the glyph cache ought to be 'linear', unfiltered, and the filtering 
is applied during rendering to the destination surface. The DW NATURAL (etc) 
settings are applied in creating the cached glyph, and aren't used in final 
rendering.
 
So I can't be 100% sure but would be surprised if the tuner UI affected what is 
used in creating the cached glyph.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2284#issuecomment-5482427226

Reply via email to