vendredi 1 avril 2016

GDI+ font size difference under different processes on same machine

I have some NUnit tests that create bitmaps using GDI+ and compares them to pre-saved images to make sure that the correct image is generated.

My problem is that texts (rendered with Graphics.DrawString) are different when I run the tests from within Visual Studio, compared to what is generated when I run then tests in my command line build script (using the NUnit 3.2 test runner).

Note: it is not some minor one-pixel-off or text wrapping issue. The font size of the texts rendered while running from the consone is waaay smaller.

Does anybody know why the font size would be different one the same machine depending on the execution environment? And equally important: what can I do about it?

Aucun commentaire:

Enregistrer un commentaire