Customize LC system fonts?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
mluka
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Sun Jun 17, 2007 12:08 am

Customize LC system fonts?

Post by mluka » Sat Sep 26, 2020 4:01 pm

Hi all.

If you look at the "Text" tab of just about any object Inspector, you'll see, under the "Font" pulldown menu, these items: (Message), (Styled Text), (System), etc.

What are these used for? Can we customize them (in order to have a uniform look across a stack)? If so, how?

Thanks!
Michel
Montréal, Canada

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Customize LC system fonts?

Post by richmond62 » Sat Sep 26, 2020 6:53 pm

Screenshot 2020-09-26 at 20.51.39.png
-

Code: Select all

on mouseDown
   put the fontNames into me
   sort lines of me ascending international
   delete line 1 to 7 of me
end mouseDown

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Customize LC system fonts?

Post by FourthWorld » Sat Sep 26, 2020 8:07 pm

Those are directives to tell LC to use the OS-defined font and size for the type of control specified by the directive's name. These are specified by each OS vendor, and will vary from platform to platform.

Using these directives instead of a specific font name lets your app meet user expectations for consistency with everything else they use easily in just one setting, rather than older methods that required us to look up the OS specs and implement them with code that branches by platform.

You can learn more about working with fonts in the User Guide included with the install.

I'm not at a computer right now, but if you have any trouble finding the description of how to use those directives, or how to use any other font, let me know and I'll find that section of the docs when I'm back in my office.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply