Windows TextArea / Textfield / Label Wrong FontSize

Is there a reason why the text shown in a text area on windows is always 3/4 of the size set.
A default textarea with Courier New @ 24 pt in ide renders at 18 point. And when copied and pasted to WordPad the font is 18 not 24.
Textarea.selectionFontSize reports 24 as the font size as well.
Same problem applies to labels and text fields.

In the screen shot all elements apparently have font size 24. The first Untitled in wordpad was typed in, the second copied from test app.

I also noticed the the textarea.rtfdata returns the font size as \fs48 while mbs calls set it to \fs36 which is what it actually is.

Built on Mac, Tested on windows 7 and 10, xojo 2020r1+ and 2016r3

Screen Shot 2020-11-13 at 1.13.56 PM

See feedback://showreport?report_id=59304 my post near the end for info on why this happens, however if you’re copying to another program, see Robin’s last comment :frowning:

You have to realize that Xojo is a cross platform language, so if I wanted a 72 point Text size on Windows and a 72 point Text size on Mac, I would hope that they would look equivalent on both platforms. For purposes of consistency a 72 point size on Windows and a 72 point size on macOS should be the equivalent of an inch sized text. This is because we’ve decided to normalize point sizes to 72 DPI for all platforms. However, on Windows the actual DPI is 96 so what you’re seeing is Xojo point size 18 (i.e. 18/72) is equivalent to actual Windows point size 24 (i.e. 24/96).

1 Like

Indeed, but alas that doesn’t help when he’s trying to copy and paste rich text from his xojo app to another app, the sizes change :frowning:

Is the 96 fixed and will never change or is it something you have to look up?

This is standard within Xojo for years. To be honest, I don’t want Xojo to go back to 96 DPI on Windows to be consistent across all platforms.