FAQ: TBarCode/SAPwin - SAP Barcode DLL
How Can I Change the Font of the Human Readable Text?
How Can I Change the Font of the Human Readable Text?
By default the Barcode DLL uses the font settings from SAPSprint or SAPGUI (in most cases equivalent to the font used in previous text output before the bar code). If you want to specify the font of the human readable text to be different you have the following possibilities.
Print Control
The font for a specific bar code type (printer bar code) can be adjusted individually via Print Control parameters.
- FN=Font Name
- FS=Font Size [pt]
- FW=Font weight [N.. normal | B .. Bold]
Example (adjust 10 pt Arial):
bC=39,M=254,H=16,FN=Arial,FS=10,D=
The print control prefix can be modified in transaction SE73 (printer bar codes). Click the prefix, and then the button Maintain PrintControl. After that, a window will be displayed allowing you to change the character sequence.
Barcode.ini
- In the Barcode.ini file you can adjust the bar code font for all bar code types (as a global setting) with the following parameters:
[SETTINGS] DefFontName=Courier New DefFontSize=8 DefFontWeight=bold
Remove the “;” in front of the parameters to activate them. - If you need a different font for your EAN and UPC bar codes, you can use the separate EAN_UPC parameter group in Barcode.ini:
[EAN_UPC] FontName=Courier New FontSize=10 FontWeight=bold