===========================================================================
18JUL03 - SHOWCPI.EXE - Show Font Details in DOS/Windows' CPI File
===========================================================================

A Windows' CONSOLE program that lists the codepages and fonts provided in
an MS-DOS - or Windows - standard CPI (Codepage Information) file.

CPI files contain the country specific screen fonts that MS-DOS and Windows
use in full screen modes (both MS-DOS mode and full screen DOS "box" and
NT/2000/XP Console modes).

They are usually found in the Windows COMMAND (Windows 9x/Me) or SYSTEM32
(Windows NT/2000/XP) directory and have a CPI extension. If only one file
is present it will usually be named EGA.CPI.

In addition to the embedded font header details, SHOWCPI can display a 
chosen range of individual character "bitmaps" by translating the bitmap 
pattern into readable ASCII output. 

The bitmap pattern can be output using some of the "high order" PC8 ASCII
Box drawing characters (the default), or using only ASCII text characters.
(If your Console is not setup to use a Codepage 437 character set - or you
want to redirect the output to a text file and view it from an application
not able to display text in this Codepage - then you should elect output in
text characters.)

SHOWCPI will work on most standard MS-DOS and Windows CPI files - including 
Procon's HVEGA*.CPI files. (It may NOT work on proprietary OEM CPI files 
such as those distributed with DR-DOS, Caldera OpenDOS, Novell DOS, etc.). 

If a CPI file contains printer information, SHOWCPI will just attempt to 
list the codepages it supports.

CPI files typically provide three different sized screen fonts for each 
supported codepage, These are:-
  8x 8 pixels - used in 43 and 50 line screen modes
  8x14 pixels - used in 28 and 30 line modes
  8x16 pixels - used in 25 line mode.

---------------------------------------------------------------------------
SYNTAX

   SHOWCPI  CPIFile(s) [/Pnnn /C[From[-To]]] [/T]
      CPIFiles = the target CPI File(s) - can contain wildcards
        /P (Optional Switch) = Include Only One Codepage
        /C (Optional Switch) = Show Character Bitmaps
           From = Start Character (ASCII Value)
           To   = End Character   (ASCII Value)
           Valid ASCII Values are from from 0 to 255
        /T (Optional Switch) = Show Bitmaps using Text Characters

   Examples:

      SHOWCPI  EGA.CPI             - Show Codepage and font info Only
      SHOWCPI  HVEGA*.CPI          - Show Codepage and font info Only
      SHOWCPI  EGA*.CPI /P437 /C   - ALL Bitmaps for OEM Codepage
      SHOWCPI  ISO.CPI /C65        - Info and just 'A' Bitmap
      SHOWCPI  HV*.CPI /C48-57     - Info and '0'-'9' Bitmaps
      SHOWCPI  HV*.CPI /C0-127     - Info and ASCII7 Bitmaps
      SHOWCPI  HV*.CPI /C65-90 /T  - Info and Uppercase Letter
                                     Bitmaps using Text Characters


      Hence "SHOWCPI C:\WIN\COMMAND\EGA.CPI" might produce this output:-
      --------------------------------------------------------------
        Standard 16 bit MS-DOS/Windows 3.x/Windows 95/98/Me CPI File
        Contains 6 Codepages
                Codepage 1: 437 [OEM English PC-8/IBM-2], EGA Screen Font
                        Font size: 8x16
                        Font size: 8x14
                        Font size: 8x8
                Codepage 2: 850 [International/Multilingual (Latin 1)], EGA Screen Font
                        Font size: 8x16
                        Font size: 8x14
                        Font size: 8x8
                Codepage 3: 852 [Slavic/Eastern Europe (Latin 2)], EGA Screen Font
          . . . etc. . . . (Number of codepages varies with OS)


      And "SHOWCPI \WINNT\SYSTEM32\EGA.CPI /C65-66 /T" might produce this:-
      --------------------------------------------------------------
        Extended 32 bit Windows NT/2000/XP CPI File
        Contains 13 Codepages
                Codepage 1: 437 [OEM English PC-8/IBM-2], EGA Screen Font
                        Font size: 8x16
                        ================
                        ASCII 65, Char A
                            00000000
                            00000000
                            00010000
                            00111000
                            01101100
                            11000110
                            11000110
                            11111110
                            11000110
                            11000110
                            11000110
                            11000110
                            00000000
                            00000000
                            00000000
                            00000000
                        ----------------
                        ASCII 66, Char B
                            00000000
                            00000000
                            11111100
                            01100110
                            01100110
                            01100110
                            01111100
                            01100110
                            01100110
                            01100110
                            01100110
                            11111100
                            00000000
                            00000000
                            00000000
                            00000000
                        ----------------
                        Font size: 8x14
                        ================
          --------------------------------------------------------------------------------------
          . . . etc. . . . 


---------------------------------------------------------------------------
PARAMETERS

The program accepts up to THREE command line parameters:-

The FIRST parameter
  is a file specification. This can contain a full path and may contain
  wildcards. For example:-  C:\WIN\COMMAND\EGA*.CPI

The other parameters are all optional.

The Codepage parameter (/Pnnn) is optional.
  It can be used to limit output to just one Codepage (e.g., /P437 
  specifies the OEM US ASCII Codepage). 

The NEXT parameter (/C[From[-To]]) is also optional.
  It allows you to specify a range of Character bitmaps to display.
  If no numeric value follows the /C then all character bitmaps are
  included. If only the "From" value is given then just that character is
  output. (ASCII values range from 0 to 255.)
  For example:-
    /C      - include all characters
    /C128   - just the ASCII 128 character
    /C48-57 - ASCII 48 to 57 (the digits '0' to '9')

The LAST parameter (/T) allows you to request bitmap output using plain
  ASCII Text characters.


---------------------------------------------------------------------------
DEPENDENCIES

This program uses several Windows' DLL files. If these are not present you
will get an error message indicating which DLL is missing.

If this occurs, download the required DLLs from the links given in:-
   http://www.procon.com.au/UtilDLLs.htm

---------------------------------------------------------------------------
DISCLAIMER

Use this utility at your own risk! If you do not understand
  CONSOLE Mode,
  Command Line parameters,
  Windows' Codepage file usage,
  ASCII values,
  etc.,
you can only cause yourself grief.

===========================================================================

