# HG changeset patch # User Chris Cannam # Date 1544202827 0 # Node ID 759b81c38bb1328831b23dc1aebe344b32bf953b # Parent 751b21af6b6f9835ac9193050982a84f5795d1e1 Make hinting more consistent diff -r 751b21af6b6f -r 759b81c38bb1 src/changesetitem.cpp --- a/src/changesetitem.cpp Fri Dec 07 14:29:23 2018 +0000 +++ b/src/changesetitem.cpp Fri Dec 07 17:13:47 2018 +0000 @@ -311,7 +311,7 @@ if (scale > 1.0) { #ifdef Q_OS_WIN32 - f.setHintingPreference(QFont::PreferNoHinting); + f.setHintingPreference(QFont::PreferVerticalHinting); #endif } @@ -517,7 +517,7 @@ if (ps < 8) ps = 8; f.setPixelSize(ps); #ifdef Q_OS_WIN32 - f.setHintingPreference(QFont::PreferNoHinting); + f.setHintingPreference(QFont::PreferVerticalHinting); #endif } diff -r 751b21af6b6f -r 759b81c38bb1 src/changesetview.cpp --- a/src/changesetview.cpp Fri Dec 07 14:29:23 2018 +0000 +++ b/src/changesetview.cpp Fri Dec 07 17:13:47 2018 +0000 @@ -61,6 +61,13 @@ QFont f(paint->font()); f.setPixelSize(11); f.setBold(true); + QTransform t = paint->worldTransform(); + float scale = std::min(t.m11(), t.m22()); + if (scale > 1.0) { +#ifdef Q_OS_WIN32 + f.setHintingPreference(QFont::PreferVerticalHinting); +#endif + } paint->setFont(f); float x = mapToScene(0, 0).x();