From 1d5c29da59f2007b3aa75dbceae1bacfabf84da2 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 24 Feb 2016 11:55:50 +0100 Subject: Use correct underline thickness on OS X MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tor Arne Vestbø --- src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h') 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; }; -- cgit v1.2.3