Method to set the default font for controls depending on the platform?

What brought me into this was that the font display on Linux and some Windows systems is very inconsistent on a number of controls (the ListBox being the most glaring) if I don’t use “0” for the size. Any other value results in some really ugly fonts on those platforms (<https://xojo.com/issue/57192>).

That was it exactly. Sometimes we’re so involved in the esoteric that it it the obvious things that cause our failure.

Using your project I can’t get the constant to stick. I can only do it with a new project. So that’s weird.

Here is a RegEx you can use in the IDE to find, for example, controls that are a Pushbutton:

^Pushbutton$

Replace that with “CustomPushbutton” (or whatever) and you’re done.

You can do a bunch at a time like this:

^(Pushbutton|Listbox|Checkbox)$

Replace with “Custom\1” (or whatever).

my money is on the font panel validating that the name entered is a font and not something random and throwing out the #name because its not a font and it never looks at the entered text starting with a # and then seeing if that constant has the name of an actual font from the font list

but thats just a WAG …

Global SAR works since I now know what I’d missed and things are working properly. Providing the # prefix sorts it as Tim P identified.