![forums.silverfrost.com Forum Index](templates/subSilver/images/logo_phpBB.gif) |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Fri Jun 13, 2014 3:36 pm Post subject: Hershey fonts available for Simpleplot |
|
|
I changed the subject from the previous topic so that this message is not buried too deep in another discussion.....well.....Hershey fonts are available!!!....after a short but careful investigation, I remembered how Simpleplot was normally installed and among other things, the old intaller put a Simple.ini file in the Windows directory (today "folder"). So I created a simple.ini file with only the statement
[General]
HERSHEY=c:\Program Files (x86)\Silverfrost\FTN95\hershey.dat
and put in the Windows folder.....and the hershey.dat file with simple.dll in the usual FTN95 place and...WORKS AS FINE AS EVER!......in fact, it seems that the labels are now correctly aligned with the ticks on the y axis....
I could put here a copy of the test file that shows the usual plot that I showed a couple of days ago with the Courier, Helvetica, etc. but I don't know how to put available the hershey.dat file to the community.....I could send it as attachment to John-Silver, but I do not know if there is some othe people also interested....DanRRight maybe?.
Please Paul, let me know how to procede......
Hope this helps,
Agustin |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Jun 13, 2014 4:01 pm Post subject: |
|
|
If you send it to me via Silverfrost then I can upload it to make it available as a download. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Fri Jun 13, 2014 4:20 pm Post subject: |
|
|
Yes, with a request to forward to me. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Fri Jun 13, 2014 4:25 pm Post subject: |
|
|
already done!
Agustin |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
John-Silver
![](http://i.postimg.cc/K8HMTnXq/Bart-Unrivalled-Native-Plotting256.jpg)
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sat Jun 14, 2014 5:24 pm Post subject: |
|
|
Wonderful !!! you are a genius Agustin ! ... and you have a brilliant memory.
(although there is another smaller problem which has arisen .. keep reading)
Once I realised that I hadn't used the default install directory and so modified your .ini file accordingly everything worked fine.
(Note also for anyone using the Express version then the directory would be different also ! Although in fact couldn't this .ini entry be put anywhere in fact or does it have to be alongside the simple.dll ?)
... the one small problem is ..... if after creating the executable (which runs fine) I create a sub-directory ,say, Temp and simply copy the executable to there (or copy it anywhere in fact except where the program was compiled/linked, then the program doesn't give me hershey fonts as it does when I run it where I compiled and linked it !!!
(§FYI - I'm compiling in cmd line mode and I copy the simple.dll locally to where the program is to keep the slink command as short as possible to type when linking in simple.dll)
Any idea why that might be ?
Can you maybe try it on your executable file that you created and report back? Just to start with to see if it's a problem on my machine only or if it's general.
It does actually beg the question of course of whether or not the hershey.dat needs to be copied with the executable .
I tried just to check and as expected it doesn't make any difference with the test program - no hershey fonts!
What happens for example if the selection of fonts is made program dependent !?! Without having stored all the fonts within the program it would presumeably still need the .dat file at runtime?
Thanks
John |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sat Jun 14, 2014 5:58 pm Post subject: |
|
|
Some history may help. The Command Processor (DOS Box) looks for named programs to run in the different paths given in the PATH environments variable. Your program might be able to access that, but in general, user-written programs look in the current subdirectory or one you specifically named. With Windows, you can start a program with a click on its datafiles, which means that (a) the datafile type needs to be associated with a particular program, (b) the working directory may not be where the program is located, and (c) it isn't just the EXE, but other things such as INI files and DLLs that have to be looked for.
In early versions of Windows, a halfway house was used, but starting I don't remember when, this thing called the Registry was invented, which stores all the path information for such things as accompanying files. You can't just copy the EXE (unless it only uses Salflibc.dll, which is already set up in the Registry because FTN95 needs it) - you may need to either copy your EXE and everything it uses to the same directory, or you need to 'install' the program using a 'Setup' program. You probably noted that your program doesn't have an icon on the Desktop, doesn't appear on the Start menu etc etc, and these are other things that the setup program does for you.
A number of us here use Jordan Russell Software's free Innosetup, which operates through a complicated script to do all the separate stages in this installation process. The particular advantage of it is that it also bundles all the files needed for an installation into one 'zipped' EXE file, which unpacks itself when it is run.
In short, copying the EXE somewhere else is unlikely to work when you have these external files.
Eddie |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Sat Jun 14, 2014 6:14 pm Post subject: |
|
|
No problem here!...I moved my exe file to another folder and run without problems....seems you have something wrong in your system....
best regards,
Agustin
P.S. John: I did not answer your private message as the Hershey file is now available for everyone.... |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
DanRRight
Joined: 10 Mar 2008 Posts: 2819 Location: South Pole, Antarctica
|
Posted: Sat Jun 14, 2014 6:24 pm Post subject: |
|
|
Probably i have done something wrong but i do not see any effect on %pl.
I made Simple.ini with the single line above, placed it in Windows dir and placed Hershey.dat into FTN95 dir. My OS is Windows 8.1. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Sat Jun 14, 2014 6:33 pm Post subject: |
|
|
Code: | Program simple
use mswin
Real*8 x(100), y(100)
N=100
do i=1,N;
x(i)=i-1;
y(i)=sin(i/30.)**2;
enddo
CALL TEXTMN(0.1)
CALL AXLBJS('*C','C')
call thckmg('LINE',1.0)
call chset(10)
i=winio@('%pl[x_array]', 300, 200, N-4, x, y)
End |
test this simple code...it works fine here....
Agustin |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
DanRRight
Joined: 10 Mar 2008 Posts: 2819 Location: South Pole, Antarctica
|
Posted: Sat Jun 14, 2014 6:38 pm Post subject: |
|
|
Forgot to attach SPWIN module and Slink the code with SIMPLE.DLL
All works now great, thanks Agustin
How to change the font on this example to something different and more pleasant?
The tics are still a bit off though are looking MUCH much better. Look at this example
Code: |
Program simple2
use mswin
Real*8 x(100), y(100), z(100)
N=100
do i=1,N;
x(i)=i-1;
y(i)=sin(i/30.)**2;
z(i)=sin(i/30.)**5;
enddo
CALL TEXTMN(0.3)
CALL AXLBJS('*C','C')
call thckmg('LINE',3.0)
call chset(10)
i=winio@('%pl[x_array, colour=red, colour=black, N_GRAPHS=2]&', 300, 200, N-4, x, y, z)
i=winio@('%ac[esc]', 'exit')
End
|
Here is an image demonstrating what we've got.
The %pl now looks much better thanks to all the hacks you guys have done. The %pl is almost there, just little more glamour and we get professional look. The right one is how i like %pl to look as an absolute minimum
Last edited by DanRRight on Sun Jun 15, 2014 8:36 am; edited 11 times in total |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
John-Silver
![](http://i.postimg.cc/K8HMTnXq/Bart-Unrivalled-Native-Plotting256.jpg)
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sat Jun 14, 2014 6:58 pm Post subject: |
|
|
Thanks Agustin.
I just tried on my XP machine and it was OK, executing when moved to a different directory.
I shall mooch around further to see what's wrong with my Win7 system.
I realised about the hershey.dat file later when I saw this 'solution' post.
Thanks a lot.
There's still an uncertainty about what happens if the font ID is made parametric in a program. Need to devise a test program to check that one out and see what happens.
....... and Of course we still have to get DanRRight his axes on 4 sides . Might be a little more difficult if not impossible that one ![Smile](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
John-Silver
![](http://i.postimg.cc/K8HMTnXq/Bart-Unrivalled-Native-Plotting256.jpg)
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sat Jun 14, 2014 7:01 pm Post subject: |
|
|
Eddie, thanks for your input too, I'll digest that while I look for my problem.
Dan I can see you beginning to smile a little , just have to get Sfrost to expand the 'scope' of the %pl a bit now ;O) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
aebolzan
Joined: 06 Jul 2007 Posts: 229 Location: La Plata, Argentina
|
Posted: Sat Jun 14, 2014 7:52 pm Post subject: Re: |
|
|
Quote: | ="DanRRight"]Forgot to attach SPWIN module and Slink the code with SIMPLE.DLL
All works now great, thanks Agustin
How to change the font on this example to something different and more pleasant?
|
change in the subroutine CHSET the argument from 1 to 24 (I don't have the table at home so I am guessing now) and you will get the software or Hershey fonts, with negative numbers you get the hardware fonts (Curier, Helvetica, Times Roman, etc.)...it's a question of playing...I put an example program in the Clearwin forum a couple of days ago that had a loop in order to show all the possible fonts in one run. Check there....
and for the problem of the four axis, well, I cannot do miracles, the limitation is in %pl not in Simpleplot......that's why I use only %pl for testing a program not for the final graphical output.....%dw works much better.....up to now....
Agustin |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|