FontEngine[directwrite]: include leftBearing for boundingBox for glyphs
It was always 0 Task-number: QTBUG-113679 Change-Id: I090036296ad2df99b986400863b1e57a5d6101fb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 1fcbe0f6c24eff66add23bcc6212451a87d64c05) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
49f488c855
commit
e799b3de67
@ -586,7 +586,9 @@ glyph_metrics_t QWindowsFontEngineDirectWrite::boundingBox(const QGlyphLayout &g
|
||||
for (int i = 0; i < glyphs.numGlyphs; ++i)
|
||||
w += glyphs.effectiveAdvance(i);
|
||||
|
||||
return glyph_metrics_t(0, -ascent(), w - lastRightBearing(glyphs), ascent() + descent(), w, 0);
|
||||
const QFixed leftBearing = firstLeftBearing(glyphs);
|
||||
return glyph_metrics_t(leftBearing, -ascent(), w - leftBearing - lastRightBearing(glyphs),
|
||||
ascent() + descent(), w, 0);
|
||||
}
|
||||
|
||||
glyph_metrics_t QWindowsFontEngineDirectWrite::boundingBox(glyph_t g)
|
||||
|
Loading…
x
Reference in New Issue
Block a user