libgdiplus
libgdiplus copied to clipboard
A long string without spaces and line breaks is drawn without word wrap in Linux
Below is the code-snippet illustrating the issue. In Windows the code works fine.
RectangleF textRect = new RectangleF(new PointF(0, 0), new SizeF(115, 44));
Rectangle borderRect = new Rectangle(new Point(0, 0), new Size(116, 45));
string textToDraw = "WordWrapWordWrapWordWrapWordWrapWordWrapWordWrapWordWrapWordWrapWordWrap";
Image img = new Bitmap(117, 46);
Graphics gr = Graphics.FromImage(img);
Font font = new Font("Arial", 9.75f);
Brush brush = Brushes.Black;
gr.DrawRectangle(new Pen(brush), borderRect);
gr.DrawString(textToDraw, font, brush, textRect);
img.Save("drawing.png", ImageFormat.Png);
Thanks, Andy.
Is there any movement on this? We have the same problem with controls on CentOS!
The same issue, using v6.0.5 on Debian Also, the rest of the text after this long word is not displayed at all ... For example, for "WordWrapWordWrapWordWrapWordWrapWordWrapWordWrapWrapWordWrap 1 2 3 4 5", only left part of first word will be visible,