Closed biodranik closed 1 week ago
Looks good on my mdpi screen, better than before!
Now there are much less boggled fonts cases like this:
Now this is the worst case I was able to spot
Also the labels seem to be somewhat more contrast now and the min font size is smaller now.
@pastk your screen is mdpi, right? Are there any before/after screenshots?
Yeap its mdpi, this PR produces smaller, more condensed and less blurry fonts:
Can you please test if visual quality of fonts changes when you edit this parameter:
uint32_t m_sdfScale = 4;
to 1, 2, 8, 16, 32?
And also check how uint32_t m_baseGlyphHeight = 22;
influences the quality too? Maybe try 18, 24, 28, 32?
@pastk sorry, the correct place to modify these constants is here:
uint32_t VisualParams::GetGlyphSdfScale() const
{
ASSERT_INITED;
return (m_visualScale <= 1.0) ? 3 : 4;
}
uint32_t VisualParams::GetGlyphBaseSize() const
{
ASSERT_INITED;
return 22;
}
GlyphSdfScale is best with 3 (the default) or 4 (I like it a bit more). The difference is very subtle anyway. (2 is too blurry, 8 is too coarse like there is no AA at all).
GlyphBaseSize is the best with default 22. I won't change it.
Fixed size was a case only for some older mdpi devices (likely to look a bit better). SDF fonts allow dynamic resizing to any desired size without loss of quality. And each glyph should be rendered only once on the texture.
Preparation for #4281