wxPdfDocument 1.2.0
ShowFont Utility

ShowFont can be used to generate font samples in PDF form showing the Unicode coverage of the font similar in appearance to the Unicode charts. The concept of this application is based on FntSample, developed by Eugeniy Meshcheryakov for use with DejaVu Fonts project, but the code is written from scratch in C++ using wxWidgets and wxPdfDocument.

Usage

showfont -f FONTFILE -o OUTPUTFILE [-n FONTINDEX] [-e ENCODING] [-i RANGES] [-x RANGES]

showfont { -h | –help }

-f FONTFILEThe font file for which a sample should be generated. It can be the name of a TrueType, OpenType or Type1 font file, but wxPdfDocument's font description files are supported, too.
-o OUTFILEThe name of the file to which the PDF output is written.
Note
It should have the extension .pdf.
-n INDEX

The index of the font within the FONTFILE in case of TrueType Collections (.ttc) which contain multiple fonts. By default font with index 0 is used.

-e ENCODING

the font encoding of the font.

Note
This option is required only for Type1 fonts and is ignored for other font types.

The encoding defines the association between a code (from 0 to 255) and an Unicode character. The first 128 are fixed and correspond to ASCII; the next 128 are variable. The following encodings are supported by ShowFont:

EncodingDescription EncodingDescription
standardAdobe standard Latin encoding iso-8859-1Western European / Latin-1
winansiWindows ANSI aka Windows Code Page 1252 iso-8859-2Central European / Latin-2
macromanMac OS encoding for Latin iso-8859-3South European / Latin-3
symbolSymbol set encoding iso-8859-4Baltic
zapfdingbatsZapfDingbats encoding iso-8859-5Cyrillic
cp-1250Central and East European Latin iso-8859-6Arabic
cp-1251Cyrillic iso-8859-7Greek
cp-1252Western European Latin iso-8859-8Hebrew
cp-1253Greek iso-8859-9Turkish
cp-1254Turkish iso-8859-10Nordic
cp-1255Hebrew iso-8859-11Thai
cp-1256Arabic iso-8859-13Baltic Rim
cp-1257Baltic iso-8859-14Celtic
cp-1258Vietnamese iso-8859-15Western European / Latin-9
cp-874Thai iso-8859-16South Eastern European / Latin-10
cp-932Japanese koi8-rRussian
cp-936Simplified Chinese koi8-uUkrainian
cp-949Korean 
cp-950Traditional Chinese 

-i RANGESShow character codes in RANGES. (see Ranges)
-x RANGES

Don't show character codes in RANGES. (see Ranges)

-h | –helpDisplay a usage information and exit.

Ranges

The parameter RANGES for -i (–include-range) and -x (–exclude-range) can be given as a list of one or more ranges delimited by a comma (,).

Each range can be given as a single integer or a pair of integers delimited by minus sign (-).

Integers can be specified in decimal, hexadecimal (0x...) or octal (0...) format.

One integer of a pair can be omitted (-N specifies all characters with codes less or equal to N, and N- all characters with codes greater or equal to N).

Colours

Character code cells can have one of several background colours:

  • white = the character code is present in the font,
  • light grey = the character code is defined in Unicode but not present in the font,
  • blue-grey = the character code is a control character,
  • dark grey = the character code is not defined in Unicode.

Examples

Show all character codes of myfont.ttf in output file myfont.pdf:

showfont -f myfont.ttf -o myfont.pdf

Show all character codes of myfont.ttf less than or equal to U+05FF but exclude U+0300-U+036F in output file myfont.pdf:

showfont -f myfont.ttf -o myfont.pdf -i -0x05FF -x 0x0300-0x036F