Font Choice
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Font Choice
I have developed an application on the Mac and have compiled it also for the PC. The version on the PC has really wimpy looking text due to what I assume to be the font substitution.. If I move the uncompiled application to the PC and look at it in the IDE the fonts look good. Is there one single font that looks good both in the Mac and the PC environment.?
Thanks,
Larry
Thanks,
Larry
Re: Font Choice
Hi Larry,
You could use Helvetica, but it will look better if you write a little scripts that sets the font depending on the platform:
Additionally, you could check if the font is in the fontNames and use Helvetica if it isn't. If you have set different fonts for specific controls, then you need to extend the script to include those controls.
Kind regards,
Mark
You could use Helvetica, but it will look better if you write a little scripts that sets the font depending on the platform:
Code: Select all
on preOpenStack
if the platform is "MacOS" then
set the textFont of this stack to "Lucida Grande"
else if the platform is "Win32" then
set the textFont of this stack to "Tahoma"
else // linux
set the textFont of this stack to "Arial"
end if
end preOpenStack
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Font Choice
Thanks Mark and Merry Christmas.
Larry
Larry
Re: Font Choice
Mark's advice is very good. You might refine it a little by looking at "systemVersion" in the dictionary. The default font in Vista and higher is Segoe UI. Use the same concept that Mark suggests but also test for systemVersion under the Windows platform. Tahoma is still provided but Segoe UI is preferred. Here is some additional info provided by Microsoft regarding fonts to use for apps sold in the Windows Store: http://msdn.microsoft.com/en-us/library ... 00394.aspx
Re: Font Choice
Another option is to leave the font assignment empty. The engine will automatically use the system font. That lets your app remain compatible with any OS, even new ones you didn't anticipate later on.
Fonts will be inherited from higher-level objects, so to use this method you need to make sure that nothing higher in the object hierarchy has a font assigned. I.e., a button will inherit from the card, which inherits from the stack. Usually I don't assign fonts to anything. With the latest version of LiveCode you can assign text size and styles independently from the font, so you can still use those properties.
Fonts will be inherited from higher-level objects, so to use this method you need to make sure that nothing higher in the object hierarchy has a font assigned. I.e., a button will inherit from the card, which inherits from the stack. Usually I don't assign fonts to anything. With the latest version of LiveCode you can assign text size and styles independently from the font, so you can still use those properties.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Font Choice
Hi Jacqueline,
Do you have a "rule-of-thumb" for kerning issues or font size issues between platforms?
Like leave 1 character space in the field when developing on a Win machine, or something?
Thanks,
Simon
Do you have a "rule-of-thumb" for kerning issues or font size issues between platforms?
Like leave 1 character space in the field when developing on a Win machine, or something?
Thanks,
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Font Choice
Simon,
I don't have any standard rules really. Sometimes I need to set the text size a point or two larger for Windows, which I do by setting the textsize of the stack so that it will inherit throughout. I tend to use wider fields than necessary for labels and avoid the inspector options that fit the control exactly to the text so that I never need to resize them. I usually set fixedLineHeight to true and leave a fairly generous line spacing. Mostly I just look at the stack on each platform and see what I need to tinker with.
I don't have any standard rules really. Sometimes I need to set the text size a point or two larger for Windows, which I do by setting the textsize of the stack so that it will inherit throughout. I tend to use wider fields than necessary for labels and avoid the inspector options that fit the control exactly to the text so that I never need to resize them. I usually set fixedLineHeight to true and leave a fairly generous line spacing. Mostly I just look at the stack on each platform and see what I need to tinker with.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Font Choice
Hi Jacqueline,
Thanks, I guess I do the same.
Simon
Thanks, I guess I do the same.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!