summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2016-02-24 11:55:50 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2016-03-01 12:14:56 +0000
commit1d5c29da59f2007b3aa75dbceae1bacfabf84da2 (patch)
tree7b334941d10983adb61e3c513a79e2f7e9a6cf5d /src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
parentddef89b323e8507ea5f451cb53ed151e29a110b3 (diff)
Use correct underline thickness on OS X
While the calculated underline thickness would be approximately correct for many fonts and sizes, it was sometimes incorrect, e.g. for 18 pt Helvetica. Found while investigating QTBUG-33708. Change-Id: Ic1d8f2d809c02235d8f15f0414536e04c2a7b844 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h')
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
index 6f12f5a705..4ad062b699 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
@@ -92,6 +92,8 @@ public:
int synthesized() const Q_DECL_OVERRIDE { return synthesisFlags; }
bool supportsSubPixelPositions() const Q_DECL_OVERRIDE { return true; }
+ QFixed lineThickness() const Q_DECL_OVERRIDE;
+
void draw(CGContextRef ctx, qreal x, qreal y, const QTextItemInt &ti, int paintDeviceHeight);
FaceId faceId() const Q_DECL_OVERRIDE;
@@ -140,6 +142,7 @@ private:
int synthesisFlags;
CGAffineTransform transform;
QFixed avgCharWidth;
+ QFixed underlineThickness;
QFontEngine::FaceId face_id;
mutable bool kerningPairsLoaded;
};