macOS and the default font in fields

Paul Dupuis paul at researchware.com
Mon May 24 17:19:30 EDT 2021


I am hoping some macOS guru out there can explain this in some way that 
makes sense.

LiveCode 9.6.x supports Windows 7 to 10 and macOS 10.9.5 and up (10.16 
aka 11.x aka Big Sur)

I wanted to know what the default fonts are for each OS and version for 
Windows and macOS. Google returned a number of sources, such as: 
https://www.granneman.com/webdev/coding/css/fonts-and-formatting/default-fonts#mac-os-xos-xmacos

The above page is very clear for Windows > Segue UI for 7, 8, 8.1 and 10
Mac OS has Lucida Grande for Mavericks, then Helvetica Neue for Yosemite 
(10.10) and "San Francisco" from 10.11 and up, although this link above 
does not list 10.15 nor 10.16, but other google searches on Catalina say 
San Francisco.

My problem is "put the effective textFont of fld 1" for a new stack and 
single field, returns "Segue UI" on Windows (all versions I have tested on)

On Mohave (10.14) (my mac's OS), I get "(Text)" and futher, if I lick on 
properties for the field and the "A" or font properties and look at the 
font list under Mohave, there is NO "San Francisco". I see a couple 
Lucida Grande and a WHOLE LOT of Helvetica Neue's, but no "San Francisco"

Is the internet wrong on this or is this font hidden or what the heck is 
going on. If I search Apple's developer site for variations of 'Catalina 
default font' or 'Big Sur default font', I get to pages like: 
https://support.apple.com/en-us/HT211240 (for Big Sur, but pretty much 
the same for Catalina) where it list all installed fonts and there is a 
Lucida Grande and Helvetica Neue's, but again NO San Francisco.

I think I recall this came up previously as to why 'effective' textFont 
of an object does not return an ACTUAL font name, which still seems like 
a bug to me, but I vaguely recall there was some reason for it.

My objective is to store the defaults for a given OS and version on 
startup of my application, so that if the user uses existing controls to 
change fonts in various places, I cna provide a means to "Reset" them to 
the defaults

I gather from the Dictionary entries for textFont and fontNames that 
just setting the textFont of a field to "(Default)" will reset it to the 
applicable default for the control type (field) and OS and OS version. 
Does this work on Windows? If so, then WHY does "effective textFont" on 
Windows return Segue UI but on macOS returns (Text), another of these 
placeholder font names described in the fontNames function entry?

Any help making sense of this would be welcome.




More information about the use-livecode mailing list