Skip to Content

How to easily change the font of a character program

Estimated Reading Time: 1 Minutes

A default screen in isCOBOL uses SanSerif 9 pt bold. If you’re using the default font for your character screen and you want to change it, try this method.

The attached program MAIN.cbl displays a screen, but doesn’t define the main window first, so it uses the standard default window and font. We’ve added a call to a program called “NEWFONT”. This program picks up the desired font and font size from a configuration file (conf.properties) and displays a main screen with that information. Then when the MAIN program displays the screen, it will follow the standard screen’s settings, changing the size of the screen and the font.

Compile the programs like this:

   iscc *.cbl

and run the program like this:

   iscrun MAIN

You’ll see the default screen and font size.

Now uncomment the first or last 2 in the properties file and run it again with the properties file:

   iscrun -c conf.properties MAIN

You’ll be able to see what difference setting the font to Arial 16 or Consolas 20 makes. 

How to easily change the font of a character program
  • Attached Files
  • Char-Font-Change.zip (1.26 KB) 9