Philosophical questions about the fontNames

Mark Waddingham mark at livecode.com
Thu Mar 12 03:55:20 EDT 2020


On 2020-03-11 22:36, Richard Gaskin via use-livecode wrote:
> Querying the fontNames includes:
> 
> (Default)
> (Styled Text)
> (Menu)
> (Text)
> (Message)
> (Tooltip)
> (System)
> 
> These are not font names, but constants the engine accepts so that we
> can have good-looking, HIG-savvy UIs on multiple platforms.
> 
> But they're not font names.  They're not fonts at all.  They're engine
> directives.
> 
> So should they be included in the fontNames?
> 
> (Yes, I know I can exclude them. I've been doing this a while, I can
> do lots of things.  But if a newcomer wants to make a Fonts menu or
> list she also needs to know the filter command, and why she needs to
> use it to filter out things that aren't fonts. #learnability)

Haha - I noticed that at the top of Richmond's screenshot on the forums 
and I had the same thought... I also had a sneaky suspicion you would 
also comment on it!

I am inclined to agree with you - those font names are added explicitly 
after fetching the list of font names from the system - so there isn't a 
deeply technical reason why they are there.

I'll need to dig back to see if there is any internal discussion about 
it from when the theme support was added. After all, it is useful for 
the IDE to have those in the list, but it is also easy for it to add 
them in its own code!

For all intents and purposes, they should never appear in a 
'user-settable' font list in any non-UI editing type application - so 
the impact of changing it is probably next to zero.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list