International Language Environments Guide

Localization With the mp.confConfiguration File

Configuration files provide the flexibility for adding or changing font entries, or font group entries.

The system default configuration file is /usr/lib/lp/locale/$LANG/mp/mp.conf where $LANG is a locale environment variable in the locale in which printing occurs. You can specify a personal configuration file with the -u config.file path option.

A ligature or variant glyph that has been encoded as a character for compatibility is called a presentation form. The mp.conf file is used mainly for mapping the intermediate code points in a locale to the presentation forms in the encoding of the font that is used to print that code point.

Intermediate code points can either be wide characters, or output of the Portable Layout Services (PLS) layer. Complex Text Layout printing requires the intermediate code points to be PLS output. The default intermediate code generated by mp is PLS output.

Font formats currently supported are Portable Compiled Format (PCF), TrueType, and Type1 format. Both system-resident and printer-resident Type1 fonts are supported. Keep in mind the following information about the format and contents of the mp.conf configuration file:

The different sections in the mp.conf file include:

Font Aliasing

The font aliasing section of the mp.conf file is used to define alias names for each font used for printing. Each line in this section is of the following form:

FontNameAlias font-alias-name font-type font-path 			

The usual convention for aliasing a font name is to specify the encoding/script name of the font followed by a letter that indicates whether the font is Roman, Bold, Italic, or BoldItalic (R, B, I or BI).

For example,/usr/openwin/lib/X11/fonts/75dpi/courR18.pcf.Z, because it is an iso88591 Roman font, can be assigned the alias name iso88591R.


Possible values are PCF for .pcf fonts, Type1 for Adobe Type1 fonts, and TrueType for TrueType fonts. Only these three kinds of fonts can be configured in this mp.config file.


The absolute path name for the font files. For Type1 printer-resident fonts, just specify the font name, such as Helvetica.

For example,

FontNameAlias   prnHelveticaR   Type1   Helvetica

Font Group Definition

You can combine same-type fonts to form a font group. The format of the font group is as follows:




The group name for the fonts.


The font type. Create font groups for the same type of fonts only (PCF, Type1, TrueType).


The Roman font name in the font group.


The Bold font name in the font group.


The Italic font name in the font group.


The BoldItalic font name in the font group.

For creating a group, only a Roman font entry is required. The Bold, Italic, and BoldItalic fonts are optional. The different types of fonts are used to display the header lines for mail or news articles, for example. If only the Roman font is defined, that font is used in place of other fonts.

Mapping Section

The mapping section of the mp.conf files maps from the intermediate code ranges to the font group in a locale. The format for each line in this section is as follows.




A 4–byte hexadecimal value, starting with 0x, that indicates the start of the code range to map to one or more font groups.


Indicates the end of the code range to map. If the values is '-', only a single intermediate code point is mapped to the target font.


A Type1, PCF, or TrueType font group with which the presentation forms are to be printed.

Association Section

The association section of the mp.conf file associates each font with the shared object that maps the intermediate code points to the presentation forms in the font encoding. The format for each line in this section is as follows:



font alias name

The alias name defined for the font.

mapping function

Takes in the intermediate code and returns presentation forms in font encoding, which is in turn used to get the glyph index and draw the glyph.

file path having mapping function

The .so file name that contains the mapping function. You can use the utility in dumpcs to ascertain the intermediate code set for EUC locales.

Note –

The current TrueType engine used by mp (1) can work only with format 4 and PlatformID 3 cmap. You can only configure Microsoft .ttf files. Additionally, the character map encoding has to be Unicode or Symbol for the TrueType font engine to work correctly. Because most of the .ttf fonts in the Oracle Solaris environment obey these restrictions, you can map all TrueType fonts in Oracle Solaris software within the mp.conf file.

You can create a shared object that maps a font to correspond with a PCF type1 X Logical Fonts Description (XLFD). You can then create a shared object that maps from the intermediate code range to the encoding specified by XLFD. For example:


The corresponding PCF font is:


This font is encoded in ISO 8859-8, so shared objects have to map between intermediate code and corresponding ISO 8859-8 code points.

If a TrueType font with XLFD:


has the corresponding font:


you should map between the intermediate code and Unicode, because the cmap encoding for the previous TrueType font is in Unicode. In the example of this TrueType font, suppose a sample intermediate code in the en_US.UTF-8 locale that corresponds to a Hebrew character (produced by the PLS layer) is 0xe50000e9. Because the font is Unicode encoded, design the function within the corresponding .so module in such a way that when you are passing 0xe50000e9, the output corresponds to presentation form in Unicode. The example here is 0x000005d9.

The function prototype for the mapping function should be:

unsigned int function(unsigned int inter_code_pt)

The following are optional keyword/value pairs that you can use in mp.conf:

PresentationForm        WC/PLSOutput

The default value is PLSOutput. If the user specifies WC, then the intermediate code points that are generated are wide characters. For CTL printing, this default value should be used.

If the locale is a non-CTL locale and the keyboard value is PLSOutput, that value is ignored and the mp generates wide-character codes instead.

You can use the optional keyword/value pairs listed in the following table if the locale supports CTL. These variables can assume any of the possible values given in the middle column of the table.

Table 7–1 Optional Keyword/Value Pairs

Optional Keyword 

Optional Value