Save Change of Font size

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
XL-Dennis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 32
Joined: Fri Feb 10, 2012 2:22 pm
Contact:

Save Change of Font size

Post by XL-Dennis » Wed Feb 22, 2012 2:11 pm

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
------------------------------------------
Kind regards,
Dennis

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Save Change of Font size

Post by Klaus » Wed Feb 22, 2012 2:18 pm

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

XL-Dennis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 32
Joined: Fri Feb 10, 2012 2:22 pm
Contact:

Re: Save Change of Font size

Post by XL-Dennis » Wed Feb 22, 2012 2:40 pm

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
------------------------------------------
Kind regards,
Dennis

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Save Change of Font size

Post by Klaus » Wed Feb 22, 2012 3:09 pm

Hi Dennis,

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


Best

Klaus

AndyP
Posts: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Re: Save Change of Font size

Post by AndyP » Wed Feb 22, 2012 3:53 pm

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.
Andy .... LC CLASSIC ROCKS!

XL-Dennis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 32
Joined: Fri Feb 10, 2012 2:22 pm
Contact:

Re: Save Change of Font size

Post by XL-Dennis » Wed Feb 22, 2012 11:30 pm

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
------------------------------------------
Kind regards,
Dennis

XL-Dennis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 32
Joined: Fri Feb 10, 2012 2:22 pm
Contact:

Re: Save Change of Font size

Post by XL-Dennis » Wed Feb 22, 2012 11:40 pm

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
------------------------------------------
Kind regards,
Dennis

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Save Change of Font size

Post by Klaus » Thu Feb 23, 2012 1:39 pm

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

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm

Re: Save Change of Font size

Post by paul_gr » Thu Feb 23, 2012 8:40 pm

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

XL-Dennis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 32
Joined: Fri Feb 10, 2012 2:22 pm
Contact:

Re: Save Change of Font size

Post by XL-Dennis » Fri Feb 24, 2012 11:33 pm

@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
------------------------------------------
Kind regards,
Dennis

XL-Dennis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 32
Joined: Fri Feb 10, 2012 2:22 pm
Contact:

Re: Save Change of Font size

Post by XL-Dennis » Tue Feb 28, 2012 3:12 am

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
------------------------------------------
Kind regards,
Dennis

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Save Change of Font size

Post by mwieder » Tue Feb 28, 2012 6:16 pm

!!!

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

:P

Post Reply