Gfx: Improve D2D compatibility with GDI+ with zero height text when calculating lines

This commit is contained in:
Birunthan Mohanathas 2013-10-08 20:15:36 +03:00
parent 35f2e1591e
commit 67948705f4

View File

@ -410,6 +410,11 @@ bool CanvasD2D::MeasureTextLinesW(const WCHAR* str, UINT strLen, const TextForma
// bottom. This is a workaround to emulate that behaviour. // bottom. This is a workaround to emulate that behaviour.
rect.Height += 1.0f; rect.Height += 1.0f;
} }
else
{
// GDI+ compatibility: Zero height text has no visible lines.
lines = 0;
}
return true; return true;
} }