I am trying to generate an image in a console app in which the goal is to use the graphics class to draw on the picture and then save it as jpg on disk. If I run the code below in a desktop app, it produces the image correctly and the text is visible. If I take the same code and put in a console app, the text is not visible. Is there a limitation in console app here?
[code]
dim picDCM as picture = new Picture(500, 500)
What platform are you on. I have a “Courier New” on my Winblows 10 installation. If you change the font to “Courier New”, does that work? Of on another platform, adjust font name as appropriate.
You can list all available fonts using: FontCount and Font global Methods.
When dealing with Text in ConsoleApplications, be aware of rendering differences compared to Desktop Applications: <https://xojo.com/issue/38272> Further TextUnit seem to be dysfunctional and the effective value is always Pixel, so calculate your TextSize accordingly: <https://xojo.com/issue/26147> and StringHeight seems to be broken in a way I wasn’t able to understand.