An issue with Microsoft's Direct2D framework.
How is it possible that width > widthIncludingTrailingWhitespace? Shouldn't it be
width == widthIncludingTrailingWhitespace
in the case of no trailing spaces and
width < widthIncludingTrailingWhitespace.
when the underlying string contains trailing spaces?
In my case the underlying string is " Info ". It has a trailing space in it and still the widthIncludingTrailingWhitespace is zero. See screenshot:
MSDN documentation states:
widthType: FLOAT
A value that indicates the width of the formatted text, while ignoring trailing whitespace at the end of each line.
widthIncludingTrailingWhitespaceType: FLOAT
The width of the formatted text, taking into account the trailing whitespace at the end of each line.

It seems to be a MSDN bug.
The issue occurs only with
In the case of
the
widthIncludingTrailingWhitespaceis calculated correctly.