Mercurial > hg > easyhg
changeset 683:759b81c38bb1
Make hinting more consistent
author | Chris Cannam |
---|---|
date | Fri, 07 Dec 2018 17:13:47 +0000 |
parents | 751b21af6b6f |
children | 6bfca8973f79 |
files | src/changesetitem.cpp src/changesetview.cpp |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 }
--- 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();