Main Menu

KB#00410-How to change the font with a sysplot device

Title:

How to change the font with a sysplot device

Description:

The sysplot device is a plotting device which is reference by an alias of D0, D1, etc. There should be one alias line in the config.bbx by default, but if not, here's how it should look: 

alias D0 sysplot 

There are a couple of things which you can do to change the behavior of the sysplot device. One is to change the background color by use of the 'CLEAR' mnemonic after the sysplot device is opened. You can give it a color number like such: 

10 OPEN(1)"D0" 
20 PRINT(1)'CLEAR'(6) 

You can also change the font which is used for printing. There are several soft fonts which are installed in the /graphics directory. They are duplex,sft, olde.sft, script.sft, simplex.sft, & symbols.sft. This soft font file is loaded into a number, then that number is used with the 'FONT' mnemonic. For example, in the program, _bar.pub, line 2210 sets the font to "f" or 0, which is the default: 

2210 PRINT (CHAN)'FONT'(F), 

You can change to a different font (assume script.srf) by doing the following: 

2210 LET F=1; PRINT (CHAN)'FONT'(F,"script.sft"),'FONT'(F), 

The next example will run through several fonts: 

145 print (chan)'font'(1,"Script.sft"),'font'(2,"Simplex.sft"),'font'(3,"Symbols.sft") 

2210 F=rnd(4);print (chan)'font'(f), 

Make sure the /graphics directory is in your path, or that the font files are in the Visual PRO/5 directory.



Last Modified: 03/31/1998 Product: Visual PRO/5 Operating System: Windows

BASIS structures five components of their technology into the BBx Generations.

  Google+ View BASIS LinkedIN ProfileVisit our Twitter Feed Check out our Facebook Public Profile Click to View the BASIS youTube channel