I'm using simple code to draw text inside specified rectangle. Everything works fine, except that sometimes text layout is different depending on graphics scale (set via Graphics.ScaleTransform method).
It's hard to describe the issue in words, so take a look at example image
- ScaleTransform set to something around 0.3 - text fits in one line within specified rectangle.
- ScaleTransform set to something around 0.6 - text is wrapped before last word.
In both cases it's the same font, text, layout rectangle, StringFormatting and so on. The only thing that changes is the scale. Note that I do not use "font scaling"! In both cases IT IS even the same font object. No StringFormatFlags set.
How can I fix that? I don't care if text will be wrapped or not - I just need the consistency. Always wrapped or not, no matter the scale. How to do that?