Fonts on-the-fly?

Just starting out? Need help? Post your questions and find answers here.
epog10
User
User
Posts: 93
Joined: Sat May 29, 2010 11:46 am
Location: UK

Fonts on-the-fly?

Post by epog10 »

I have a series of files with some captions which have their own font specifications.

These have been pre-set and extracted using FontRequester and the different elements saved as a series of variables.

Is it possible to construct a LoadFont from variables?

Can't seem to work it out such as:-
aSIZE = "14"
aFONT = "Arial"
aLINE = " " + CHR(34) + aFONT + Chr(34) + ", " + aSIZE
LoadFont(1, aLINE)

Cannot make it work and all the functions I read about seem to be to extract individual items from FrontRequester.

An alternative would be to be able to save a complete LoadFont command line.
epog10
User
User
Posts: 93
Joined: Sat May 29, 2010 11:46 am
Location: UK

Re: Fonts on-the-fly?

Post by epog10 »

Sorry about that!
Must have had a senior moment!!

The following seems to work quite well:-
aNS1 = Trim(GetGadgetText(#Text_5)) ;Construct font
X = Val(GetGadgetText(#String_6)) ;Size
FontID1 = LoadFont(1, aNS1, X)

Regards
epog10
Post Reply