summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-06-15 08:14:18 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-06-15 08:30:22 (GMT)
commitd6bcab9e1cfb3a3b91b45269d68a594f6f079914 (patch)
tree58b97832165c1688f582626c1463d75d3888511b /src/gui/text
parent40b11de259b6bdaf43ca9ccd0abd9106321a5616 (diff)
downloadQt-d6bcab9e1cfb3a3b91b45269d68a594f6f079914.zip
Qt-d6bcab9e1cfb3a3b91b45269d68a594f6f079914.tar.gz
Qt-d6bcab9e1cfb3a3b91b45269d68a594f6f079914.tar.bz2
Fix regression, remove artificial emboldening of monospaced fonts
In change 889e13652e00ba64060e7b62ed3377ea04d44faa we employed usage of artificial emboldening of fonts with FreeType when a bold variant of the font does not exist. This introduced a regression for monospaced fonts, where the contract says that all glyphs must be the same width. Since the artificial emboldening algorithm does not support this contract, it has been turned off for monospaced fonts, reverting to the old behavior for this particular class of fonts. Task-number: QTBUG-11353 Reviewed-by: Paul
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 9056012..2c4fbab 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -690,7 +690,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format)
if (fake_oblique)
transform = true;
// fake bold
- if ((fontDef.weight == QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD))
+ if ((fontDef.weight == QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face))
embolden = true;
// underline metrics
line_thickness = QFixed::fromFixed(FT_MulFix(face->underline_thickness, face->size->metrics.y_scale));