mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Gfx: Make AccurateText=1 more consistent with GDI+ for D2D when a newline character is the last character of the text
This commit is contained in:
parent
6e04fd983f
commit
aa4c4a6dfc
@ -249,6 +249,15 @@ DWRITE_TEXT_METRICS TextFormatD2D::GetMetrics(
|
|||||||
metrics.height += m_LineGap;
|
metrics.height += m_LineGap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// GDI+ compatibility: With accurate metrics, the line gap needs to be subtracted
|
||||||
|
// from the overall height if the string does not contain newlines.
|
||||||
|
if (!strippedLastNewLine && wmemchr(str, L'\n', strLen) == nullptr)
|
||||||
|
{
|
||||||
|
metrics.height -= m_LineGap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user