|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Wed Mar 11, 2015 3:58 pm Post subject: TEXT_ARRAY sizing questions |
|
|
I am using a text array, and apply a scaling factor. The question I have regards use of the scaling factor that one can apply. The results are not "linear", meaning 50% is not 1/2 the size in both height and width.
The basic code segment used for the code is:
Code: |
k = winio@('%fn[Courier New]%ts%bf&',SCREEN_SCALING)
k = winio@('%^33.80tx&',SCREEN_DATA,SCREEN_ATTR,80L,33L,KEYSTROKE)
....
|
%fn to set the font, %ts to set the scaling, %bf to make it all bold.
As the double SCREEN_SCALING is changed, the change in the size of the displayed window and the displayed font is not linear. Specifically, when I scaled between 0.8 and 0.9, the height changed, but not the width.
Any thoughts, and, if there is a better fixed size font solution, what should I change to make the scaling change more linear?
Other than this minor question, I really like the capabilities and flexibility text array has given my program.
Bill |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7927 Location: Salford, UK
|
Posted: Wed Mar 11, 2015 4:58 pm Post subject: |
|
|
If you look in Plato and open the Options dialog box on the Tools menu then the list of fonts contains only fixed size fonts. But if you want to distribute your application then you will need to use a font that is widely available. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Wed Mar 11, 2015 5:07 pm Post subject: |
|
|
Thanks, Paul. I saw that but didn't catch the nuance.
Bill |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Mar 11, 2015 6:39 pm Post subject: |
|
|
Font sizing is an art.
Different versions of Windows use different default system fonts, so a good bet would be to either get your windows version and work from that as a starting point, or wrap your application up in an installer (i.e. something that makes a SETUP.EXE) and install a font like Segoe UI (Win 7's default)
Clearwin+ works in units of the average character size, and this is then rounded in some way to produce an integer number of pixels high and wide. If you want to put a grid of this on your window temporarily there is a format code to do it. As the character cell may be an odd number of pixels high or wide, halving it won't be exact., and indeed some scale factors won't seem to give you a change, e.g. 0.9 of 6 pixels is still 6 pixels.
Fixed size fonts are a bit of a hangover from Windows 1 and they are even less scalable (if at all) ....
Eddie |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|