Page 1 of 1

Save Change of Font size

Posted: Wed Feb 22, 2012 2:11 pm
by XL-Dennis
Hi,

I'm on Windows 7 and have a general issue when it comes to Font size in LiveCode. Each time I start up I enter the following command in Messagebox;

set the textSize of stack "Home" to 14

It works, although not all labels and stacks are updated. It's annoying but my general request is that the selected font size should be saved so I don't need to run the command each time I start LiveCode.

All help is welcome!

Thanks in advance,
Dennis

Re: Save Change of Font size

Posted: Wed Feb 22, 2012 2:18 pm
by Klaus
Hi Dennis,

maybe you should add a line like this:

Code: Select all

set the textSize of stack "Home" to 14
save stack "Home"
At least worth a try! :D

But maybe Livecode does some font initializing depending on the platform when the app starts!?
In that case this will not "stick" unfortunately.


Best

Klaus

Re: Save Change of Font size

Posted: Wed Feb 22, 2012 2:40 pm
by XL-Dennis
Klaus,

Thanks for the input. Unfortunately it didn't work. I'm somehow surprised to face this issue in the first place. I have never experienced it before.

BTW, I need a magnifiers for the Code Editor. How can I increase the font size in it.

Thanks in advance,
Dennis

Re: Save Change of Font size

Posted: Wed Feb 22, 2012 3:09 pm
by Klaus
Hi Dennis,

hm, in my LiveCode preferences I can set the font and fontsize for the "Script Editor"!? 8)


Best

Klaus

Re: Save Change of Font size

Posted: Wed Feb 22, 2012 3:53 pm
by AndyP
Hi Dennis,

I normally go for the'belt & braces' approach when it comes to setting font sizes.

So first I detect the OS and then set fonts, font styles and font sizes depending on the OS Mac & Win
This is part of one of my library routines I use in all projects.

call with openStack

on setOSDefaults
if the platform = "MacOS" then

//set default font and default size of fields
repeat with x = 1 to the number of fields of cd "MyCard" of Stack "MyStack"
set the textFont of field x of cd "MyCard" of Stack "MyStack" to Tahoma
set the textSize of field x of cd "MyCard" of Stack "MyStack" to 12
set the textStyle of field x of cd "MyCard" of Stack "MyStack" to "empty"
end repeat

//set default font and default size of buttons
repeat with x = 1 to the number of buttons of cd "MyCard" of Stack "MyStack"
set the textFont of button x of cd "MyCard" of Stack "MyStack" to Tahoma
set the textSize of button x of cd "MyCard" of Stack "MyStack" to 12
set the textstyle of btn x of cd "MyCard" of Stack "MyStack" to "plain"
end repeat

else
//>>Win

//set default font and default size of fields
repeat with x = 1 to the number of fields of cd "MyCard" of Stack "MyStack"
set the textFont of field x of cd "MyCard" of Stack "MyStack" to Arial
set the textSize of field x of cd "MyCard" of Stack "MyStack" to 14
set the textStyle of field x of cd "MyCard" of Stack "MyStack" to "empty"
end repeat

//set default font and default size of buttons
repeat with x = 1 to the number of buttons of cd "MyCard" of Stack "MyStack"
set the textFont of button x of cd "MyCard" of Stack "MyStack" to Arial
set the textSize of button x of cd "MyCard" of Stack "MyStack" to 14
set the textstyle of btn x of cd "MyCard" of Stack "MyStack" to "plain"
end repeat

end if
end setOSDefaults

Hope this is of some use.

Re: Save Change of Font size

Posted: Wed Feb 22, 2012 11:30 pm
by XL-Dennis
Hi all,

Many thanks for Your input Andy (also Klaus). When trying to execute the code it's stops on each line that includes the Font Type. Why that?

Thanks in advance,
Dennis

Re: Save Change of Font size

Posted: Wed Feb 22, 2012 11:40 pm
by XL-Dennis
Klaus,

While I'm able to change the preferences for Script Editor, i.e. font size, it has no affect at all.

I find it annoying so I hope it can be resolved.

Kind regards,
Dennis

Re: Save Change of Font size

Posted: Thu Feb 23, 2012 1:39 pm
by Klaus
Hi Dennis,

hmmm, setting size etc. also works here...

Unfortunately I am not sure where LiveCode saves its preferences on Windows,
I guess either in specialfolderpath(35) or specialfolderpath(26)

Open the message box and type:
launch document (specialfolderpath(35))

resp.
launch document (specialfolderpath(26))

That will open the folders and you can check if there are folders named "RunRev"
and inside that folder the file "livecode.rev".
That is where LC stores its preferences.
Trashing it does help sometimes...

Then quit LiveCode, rename or delete that file and start LiveCode again.
Then try to set the prefs for the script editor again.

Maybe that helps...


Best

Klaus

Re: Save Change of Font size

Posted: Thu Feb 23, 2012 8:40 pm
by paul_gr
Hi Dennis,
I use only Windows 7 and I've never seen these font issues with Livecode.

Try reinstalling Livecode, cleaning out any preferences and see if that helps.

cheers
Paul

Re: Save Change of Font size

Posted: Fri Feb 24, 2012 11:33 pm
by XL-Dennis
@Klaus
Thanks for the input however it didn't had any impact on the font size.

@Paul
Thanks for the input. I ended up doing a re-install it didn't had any impact.

Thanks,
Dennis

Re: Save Change of Font size

Posted: Tue Feb 28, 2012 3:12 am
by XL-Dennis
Thanks to all who tried to help me with this issue. I thought I would post my final comment on the thread. I finally decided to switch platform from Windows 7 to a Linux distribution. Viola! The issue was gone so I decided to develop on Linux instead.

Case closed.

Thanks and all the best,
Dennis

Re: Save Change of Font size

Posted: Tue Feb 28, 2012 6:16 pm
by mwieder
!!!

I think you will find that many problems (not just LiveCode ones) disappear when you switch from Windows to linux.

:P