Blog: Tech Talk

agsdix-fas fa-home

Blog: Home

agsdix-fas fa-pen-fancy

Blog: CEO's Corner

agsdix-fas fa-code

Blog: Tech Talk

Blog: Product Releases

Blog: Conversion

arrow left circle icon Blog: Tech Talk

Utilizing AFP Font Maps To Customize Font Display

by | Apr 24, 2012

Font Maps enable companies to standardize how AFP documents display by overriding the internal font objects with custom fonts and styles. Created as simple ASCII files, AFP font maps can be edited by users to define their own font definitions including font type, point size, color, and style.

Snowbound’s RasterMaster imaging SDK automatically loads the snbd_map.fnt file if it is found in one of the following directories: the \Windows directory, the directory into which images are being read, or the directory where your application exists as long as you are not changing directories with a dialog box.

Format of Font Mapping Data

Any AFP font name can now be mapped to the following:

  • face name
  • point size
  • bold attributes
  • italic attributes

The snbd_map.fnt file is a simple ASCII text file. Each entry is ended with a carriage return. For Example:


C0BC25I3Font resource name in the AFP file.
CourierNew face name to map to.
10New size in points or 1/72 of an inch.
0Bold attribute, 0 – off , 1 – on
0Italic attribute 0 – off, 1 – on

Setting the path of the font mapping file using IMGLOW_set_fontmap_path()

int SNBDAPI IMGLOW_set_fontmap_path(char *path);

pathA string pointer to the path to look for the snbd_map.fnt file. The
snbd_map.fnt file will be appended to the path name.

Setting font mapping using IMGLOW_set_fontmap()

int SNBDAPI IMGLOW_set_fontmap(char *font_map, int maplength);

font_mapPointer to font mapping data
maplengthThe integer length of font mapping data

More Information

For more information on how to identify and resolve font configuration issues, please see Configuring Support for Non-English Characters and Non-standard Fonts.