summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2016-10-21 10:13:20 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2016-10-24 14:52:49 +0000
commit592614ea3ecd90ede2ae1b8e6579d1b898f474ec (patch)
tree7b010c78be3c2245f529d6886d3d979ea0f53f96 /src/gui
parent30b7278c5cf1df0b507cd3139a53b7adcc190850 (diff)
Don't claim all fonts are smoothly scalable on Windows
Since 40ebda3efbcf00c3393cb70c9eee203c68a57311, bitmap fonts are detected as smoothly scalable on Windows. While the fontsAlwaysScalable() does say whether or not the font engine can rasterize the fonts at any size, it does not determine whether or not the result is "attractive" as the documentation for isSmoothlyScalable() says. Only outline fonts are smoothly scalable, and this fact is used in Qt Quick to determine whether we can use the distance field renderer for the font or if we have to fall back to the native renderer. The consequence was that the fonts were no longer usable in Qt Quick. We also need to revert the optimization for isBitmapScalable() since there a font that is smoothly scalable should not be identified as bitmap scalable (basically this means: Font is not smoothly scalable, but it can be scaled with bitmap scaling artifacts). [ChangeLog][QtGui][Text] Fixed a regression where raster fonts on Windows were detected as smoothly scalable and thus rendering with said fonts in Qt Quick would break. Task-number: QTBUG-56659 Change-Id: Ia7db6fee8249aca347233a488388be5c3a00c2df Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontdatabase.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index f063541249..04081a5ca7 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1657,9 +1657,6 @@ bool QFontDatabase::isFixedPitch(const QString &family,
bool QFontDatabase::isBitmapScalable(const QString &family,
const QString &style) const
{
- if (QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fontsAlwaysScalable())
- return true;
-
bool bitmapScalable = false;
QString familyName, foundryName;
parseFontName(family, foundryName, familyName);
@@ -1700,9 +1697,6 @@ bool QFontDatabase::isBitmapScalable(const QString &family,
*/
bool QFontDatabase::isSmoothlyScalable(const QString &family, const QString &style) const
{
- if (QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fontsAlwaysScalable())
- return true;
-
bool smoothScalable = false;
QString familyName, foundryName;
parseFontName(family, foundryName, familyName);