mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-13 19:49:36 +00:00
Fix text wrap not measuring whitespace
This commit is contained in:
@@ -495,6 +495,11 @@ void DrawSurface::DrawStringWrap(const Point &point, const Rect &constrainRect,
|
||||
if (character == '\r')
|
||||
break;
|
||||
|
||||
const PortabilityLayer::RenderedGlyphMetrics *metrics = nullptr;
|
||||
const void *glyphData = nullptr;
|
||||
if (rfont->GetGlyph(chars[i], metrics, glyphData))
|
||||
spanWidth += metrics->m_advanceX;
|
||||
|
||||
i++;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user