Re: macOS and the default font in fields

2021-05-25 Thread Paul Dupuis via use-livecode

On 5/25/2021 3:06 PM, J. Landman Gay via use-livecode wrote:

On 5/24/21 4:19 PM, Paul Dupuis via use-livecode wrote:
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


The fonts in parentheses are special placeholders for the current 
system's various text fonts or styles, created so we don't have to 
figure out what that is. You should be able to reset the fields by 
assigning one of those, probably either ("Text") or ("Default"), as 
the font and let LC figure out what to use. That should work on all 
operating systems, including mobile.


I can't explain the discrepancy when getting the effective textFont 
but I've been using "(Text)" most of the time with good results.




Yup, that's the solution I went with -- set the textFont of tObject to 
"(Text)" -- where tObject is always a field reference and it works well.


As an old school programmer, it just bugs me that some piece of software 
(the macOS, LiveCode, whatever) is trying to hide the actual font from 
me for whatever reasons.


As always, thanks for replying with the tip.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: macOS and the default font in fields

2021-05-25 Thread J. Landman Gay via use-livecode

On 5/24/21 4:19 PM, Paul Dupuis via use-livecode wrote:
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


The fonts in parentheses are special placeholders for the current system's various text fonts 
or styles, created so we don't have to figure out what that is. You should be able to reset the 
fields by assigning one of those, probably either ("Text") or ("Default"), as the font and let 
LC figure out what to use. That should work on all operating systems, including mobile.


I can't explain the discrepancy when getting the effective textFont but I've been using 
"(Text)" most of the time with good results.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


macOS and the default font in fields

2021-05-24 Thread Paul Dupuis via use-livecode
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.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode