Caution: This version of this document is no longer maintained. For the latest documentation, see


Create font server index files


mkfontdir [options]

Runs on:

QNX Neutrino, Linux, Microsoft Windows


Backup the old fontdir file before overwriting.
-d dir
Directory containing font files.
-f pattern
Construct details for this font pattern only (the default is *).
-i file
The name of the font index file (the default is fontdir in the font file directory). If the name doesn't start with any of the characters /, ./, or ../, the index file is assumed to be located in the font directory specified by the -d option.
-m file
-S directory
The directory containing font engines. The default is the directory currently used by phfont.
Sort the resultant index file.
Increase verbosity.


The mkfontdir utility builds an index file for the fonts in a directory. This index contains information such as the name and type of each font, its size and style, a textual description of the font family, and the range of characters defined within the font. To be available to an application, at least one font must be defined in this configuration file.

Note: If you're using mkfontdir under Linux, you should make sure that your LD_LIBRARY_PATH environment variable includes /opt/qnx630/host/linux/x86/usr/lib. As well, because Linux has its own version of mkfontdir, you need to start the utility with the full path, /opt/qnx630/host/linux/x86/usr/bin/mkfontdir, to start the QNX version.


Create an index file called my_fontdir in the current working directory:

mkfontdir -i ./my_fontdir -d ${PHOTON_PATH}/font_repository

Create an index file called my_fontdir in the ${PHOTON_PATH}/font_repository directory:

mkfontdir -i my_fontdir -d ${PHOTON_PATH}/font_repository


The index files for the fonts.

Environment variables:

The name of the root directory containing Photon files.

Exit status:

An error occurred; an error message is displayed.