Fraser Gordon fraser.gordon at
Fri Feb 3 22:20:48 EST 2017

On 2017-02-03 21:03, Phil Davis via use-livecode wrote:

> I'm currently fiddling around with fonts. I see that the list returned 
> by 'the fontNames' contains some 'placeholder' values, namely these:
>    (Default)
>    (Menu)
>    (Message)
>    (Styled Text)
>    (System)
>    (Text)
>    (Tooltip)
> Is there a way to find out what font is used when a field's textFont 
> is set to "(Default)" or some other placeholder value?
Yes and no - the font that is being used for, say, "(Message)" has a 
name that will be returned if you ask the macOS system for the font for 
push buttons and then ask what the name of that font is - it might be 
"San Francisco" on recent versions of macOS, for example. When I 
originally added these pseudo-fonts in LC8, that's exactly what asking 
for 'the effective textfont of...' would give you. Unfortunately, it 
turns out that the font you get when you try to request the macOS system 
fonts by name is *not* the same font as when you ask the 'official' way 
(which means that setting the textFont of a control to its effective 
textFont actually changes the font!).

So, no, because LiveCode doesn't provide a way to get the "display name" 
of the font used for these.

But yes, because the font really *is* "(Message)" because that's the 
only name for it that LiveCode can actually use.

I hope that's about as clear as mud for you ;)


More information about the use-livecode mailing list