Tiny fonts on hi-res Mac screens

Hi,
is there a difference between Mac and Windows regarding the Font attribute usePointSize? For my GUIs I set it to true, which gives reasonable font sizes on hi-res Windows screens, but often tiny fonts on high-res Mac screens. On the Mac, some Qt control widgets get an OK font size (even a bit big); but my static texts come out very small, and usePointSize seems to have no effect. Or does the Mac have something similar to the Windows display scaling settings?
Thx

Could you post some example code and a screenshot or two? I’m not familiar with any high-dpi bugs on Mac (and in fact I would be much more suspicious of Windows, since the high-dpi support over there is an absolute nightmare).

After looking at the code, I’m a bit suspicious…

  1. On my mac, usePointSize makes no difference, which is almost surely incorrect based on the QT documentation.
  2. usePointSize:false is the default but SHOULD break everything on a high-dpi system. In fact, we should probably not even be exposing this parameter because the use-cases for this are very esoteric, and it’s probably just confusing. But basically: if this were actually doing what it sounds like it’s supposed to do, this would have been noticeable via bad bugs for years… ergo, it’s probably not working as we expect?

Really curious to see your code and screenshots though.

Thanks for your response; here is a link to three .png files:
The Mac one is made on a 2560x1440 screen, the Windows ones are on a 3000x2000 screen at 200% and 100% UI scalings. I have not changed the fonts of Button, TextField, NumberBox. The font for StaticText and grid labels is Font.new(\Arial, 8, usePointSize: true).
I’d like the fonts on Mac to size in the way they do on Windows, but I haven’t figured out how to do it. I have tried to copy a Font object from a Button and apply it to a StaticText, and that works, but it seems kind of clunky…
Best /S

What does this code render like on your system?

(
~pointFont = Font(size:12, usePointSize:true);
~pixelFont = Font(size:12, usePointSize:true);
View().layout_(VLayout(
	Button()
		.fixedSize_(200@30)
		.states_([["usePointSize:false"]])
		.font_(~pixelFont),
	Button()
		.fixedSize_(200@30)
		.states_([["usePointSize:true"]])
		.font_(~pointFont),
	StaticText()
		.fixedSize_(200@30)
		.string_("usePointSize:false")
		.font_(~pixelFont),
	StaticText()
		.fixedSize_(200@30)
		.string_("usePointSize:true")
		.font_(~pointFont),
	UserView()
		.fixedSize_(200@30)
		.drawFunc_({
			Pen.stringInRect("usePointSize:false", Rect(0, 0, 200, 30), ~pixelFont, Color.white)
		}),
	UserView()
		.fixedSize_(200@30)
		.drawFunc_({ 
			Pen.stringInRect("usePointSize:true", Rect(0, 0, 200, 30), ~pointFont, Color.white) 
		}),
)).front;
)

On mine (next to the sc ide for scaling comparison)…

Well, when I corrected the second line of your code snippet to “…false”), it looks like this:

test

Wow, so it looks like usePointSize is being used on Windows but is a no-op on Mac? It’s possible that the Win/Mac difference here is in SuperCollider itself, but I didn’t see any evidence of that. I would have expected this to be called out in the QT documentation - but in general Windows high-dpi support is an absolute labyrinth :frowning:, so it’s not totally surprising that there are exceptional cases here.

Is the screenshot you posted based on 1.5x or 1.25x scaling?

The very strange thing here is - the Windows screenshot you just posted is not high-dpi: it’s a 1.0x ratio (the buttons are 30px high). Which means, somehow either usePointSize:true is adding a scaling factor that is different than all of the rest of the UI, or everything in the UI except for fonts are not being scaled.

It was at 100% scaling. Here’s one at 200% scaling:

@sternsc which SC version are you using (particularly on macOS)?

SC 3.12.2 on macOS, 3.12.1 on Windows.