Cross-platform fonts...what is everyone else doing?

Derek Bump webmaster at dreamscapesoftware.com
Tue Jul 27 07:27:29 EDT 2004


> > 1) Is there a hack to determine the system font at runtime on Windows?   
> > Or should I just assume "MS Sans Serif"?
> 
> In XP I believe it's Verdana.   And it can be changed by the user, as on
> Mac OS and most Linux window managers.

It's Tahoma in WinXP, but you have to use 11pt.  The OS will tell you to use 8pt, but that doesn't display correctly in Revolution.

Derek Bump
Dreamscape Software
____________________________________________
Compress Images Easily with JPEGCompress
http://www.dreamscapesoftware.com
 

----- Original Message ----- 
From: "Richard Gaskin" <ambassador at fourthworld.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Tuesday, July 27, 2004 4:13 AM
Subject: Re: Cross-platform fonts...what is everyone else doing?


> Frank Leahy wrote:
> > 1) Is there a hack to determine the system font at runtime on Windows?   
> > Or should I just assume "MS Sans Serif"?
> 
> In XP I believe it's Verdana.   And it can be changed by the user, as on
> Mac OS and most Linux window managers.
> 
> > 2) Is using a "preOpenStack" handler that runs through every control  
> > and sets the textFont attribute -- at *runtime* -- the only way to do  
> > what I want to do?
> 
> Not at all:  font attributes, along with color and patterns, are
> inherited.  You can set things once for the stack and all objects which
> don't have their own settings will be rendered with the inherited settings.
> 
> > 3) Can anyone suggest a better alternative (and no, having the user  
> > install a good looking cross-platform font isn't an option :-)
> 
> I set the font for the mainStack to "0" (zero), and then set textSize
> appropriate for the target platform.  Whenever the engine can't find a 
> specified font it will render in the systemFont.
> 
> Scott Raney advises me not to rely on that, but in the absence of a
> systemFont function I can't think of another way to avoid hard-wiring
> the font name.  Besides, any font vendor that names a font "0" should
> expect trouble. ;)
> 
> -- 
>   Richard Gaskin
>   Fourth World Media Corporation
>   ___________________________________________________
>   Rev tools and more:  http://www.fourthworld.com/rev
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 


More information about the use-livecode mailing list