fontNames

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

fontNames

Mike Kerner via use-livecode
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?

I'm using LC 8.1.2 on Mac OS X 10.11.6.

Thanks -
Phil Davis

--
Phil Davis

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: fontNames

dunbarx
I fear I am becoming more and more orphaned around here, languishing in v.6x.

For what it is worth, the fontNames returns only a list of fonts, one per line, in my world. Is it a v.8 thing?

Craig Newman
Reply | Threaded
Open this post in threaded view
|

Re: fontNames

Mike Kerner via use-livecode
Hi Craig,

Maybe those new 'fonts' debuted in LC 7. I see what you're talking about
in LC 6.7.10, then in 8.0.2 I see the additional ones. I don't have LC 7
installed anywhere and don't want to take the time, and none of the
release notes for 6 / 7 / 8 mention it (that I can see), so... guess I'm
moving on. It isn't a showstopper for me, just a curiosity more than
anything.

Thanks -
Phil


On 2/3/17 6:31 PM, dunbarx via use-livecode wrote:

> I fear I am becoming more and more orphaned around here, languishing in v.6x.
>
> For what it is worth, the fontNames returns only a list of fonts, one per
> line, in my world. Is it a v.8 thing?
>
> Craig Newman
>
>
>
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/fontNames-tp4712188p4712189.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

--
Phil Davis


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: fontNames

Mike Kerner via use-livecode
In reply to this post by Mike Kerner via use-livecode
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 ;)

Fraser

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: fontNames

Mike Kerner via use-livecode
A masterful explanation! Thanks Fraser -
Phil


On 2/3/17 7:20 PM, Fraser Gordon via use-livecode wrote:

> 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 ;)
>
> Fraser
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

--
Phil Davis


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: fontNames

Mike Kerner via use-livecode
In reply to this post by Mike Kerner via use-livecode
Mud is much clearer. ;-)

Bob S


On Feb 3, 2017, at 19:20 , Fraser Gordon via use-livecode <[hidden email]<mailto:[hidden email]>> wrote:

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 ;)

Fraser

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode