Installing a Font Configuration
The Client API uses on a font configuration file containing a list of all fonts known by the API. These fonts must be supported by the physical/emulated printer. Installing a new font on the Emulator (Refer to Installing a Font in the Emulator Printer) is analogous to installing a font on a physical printer. The font configuration file must be modified before the Client API recognizes the new font. Configuration changes to the drivers are done via the MI Configuration Tool. Configuration changes to the emulator are done by manual modification of the configuration files.
The file named pipremulator.fntcfg must be edited to modify the emulator font configurations. This file contains the name, description, options, font type, and size. Even though the file can be edited programmatically, a developer may decide to modify the file manually for the emulation of one specific printer hardware.
This file is located in:
ECLIPSE_HOME\plugins\com.sap.ip.me.mdk.pios.docgen_X.Y.Z\emulator\pios\
config\pipremulator.fntcfg
Where ECLIPSE_HOME refers to the location in the hard disk where Eclipse is installed and X.Y.Z refers to the plugin version, for example 1.1.0.

This file does not exist the first time the emulator runs. It is created and read when the Printer API opens the connection to the Emulator.

This file is read during the opening of the connection to the printer. If a change is made after the connection has been opened and before the connection is closed, changes will take effect the next time the connection opens.
The file structure is explained below:
File Variables
Variable |
Description |
Configs |
Lists the font configurations available to the PIOS Client API. |
Fonts Parameters
A font configuration called fontcfgname needs the options explained below. Font configurations must be listed in the Configs variable mentioned above.
Parameter |
Description |
fontcfgname |
This is left blank, but the line must be included in the file. |
fontcfgname._Type |
This parameter is always set to “Font“. |
fontcfgname.Name |
The name of the font. |
fontcfgname.Description |
Parameter that contains a short description of the font. |
fontcfgname.Options |
Specify the options of the font. Possible values are: 0 - Normal 2 - Bold 4 - Italic 6 - Bold and italic 8 - Underline 10 - Bold and underline 12 - Italic and underline 14 - Bold, italic, and underline |
fontcfgname.FontType |
Tells whether the font type is scalable or bitmapped. Possible values for this parameter are: 1 - bitmapped 2 – scalable |
fontcfgname.Size |
This value tells the size of the font. |

Make sure font configurations added to this file match those installed in the InstalledFont.username. The font configurations included in this file map installed fonts in the emulator.
1. Make a backup copy of the file named pipremulator.fntcfg.
2. Open the file named pipremulator.fntcfg in a text editor.
3. Add the font family name to list of supported configurations (Configs). (Refer to before and after example below.)
4. Add the font configuration parameter lines: _Type, Name, Description, Options, FontType, and Size. (Refer to before and after example below.)
Font configuration is added.
The following is an example of font configuration file. The sequence of lines has been adjusted and blank lines are added for ease of reading.
#Fri Jul 16 16:02:53 VET 2004
#Initial Installation
Configs=Bitmapped
Bitmapped=
Bitmapped._Type=Font
Bitmapped.Name=Courier New
Bitmapped.Description=plain bimapped font
Bitmapped.Options=0
Bitmapped.FontType=1
Bitmapped.Size=10
Below is an example of the same file after a new font configuration, ScalableBoldItalic, is added. For visualization purposes the added font lines have been colored red.
#Fri Jul 16 16:02:53 VET 2004
#Initial Installation
Configs=Bitmapped,ScalableBoldItalic
Bitmapped=
Bitmapped._Type=Font
Bitmapped.Name=Courier New
Bitmapped.Description=plain bimapped font
Bitmapped.Options=0
Bitmapped.FontType=1
Bitmapped.Size=10
ScalableBoldItalic=
ScalableBoldItalic._Type=Font
ScalableBoldItalic.Name=Batang
ScalableBoldItalic.Description=bold&italic scalable font
ScalableBoldItalic.FontType=2
ScalableBoldItalic.Options=6
ScalableBoldItalic.Size=10