Rendering text with StringTrimming.EllipsisCharacter and StringFormatFlags.NoWrap does not render any ellipsis.
The following code:
using var font = new Font("Arial", 11f, GraphicsUnit.Pixel);
using var backBuffer = new Bitmap(100, 35);
using (var graphics = Graphics.FromImage(backBuffer))
using (var stringFormat = new StringFormat())
{
graphics.Clear(Color.White);
stringFormat.FormatFlags = StringFormatFlags.NoWrap;
stringFormat.Trimming = StringTrimming.EllipsisCharacter;
var bounds = new RectangleF(10, 10, 45, 16);
graphics.FillRectangle(Brushes.Red, bounds);
graphics.DrawString("Too long string", font, Brushes.Black, bounds, stringFormat);
}
Rendering text with StringTrimming.EllipsisCharacter and StringFormatFlags.NoWrap does not render any ellipsis.
The following code:
Renders an image like this on Windows:![text_win](https://user-images.githubusercontent.com/7846682/157278353-5c6b10b0-ff6b-4057-b208-261692583af3.png)
But like this on Linux with Pango backend:![text_linux](https://user-images.githubusercontent.com/7846682/157278501-935904e2-dd70-4010-b94b-5b3118e09c9a.png)