Cover Girl Strip Poker Font
Format type | Font |
---|---|
Max glyph count | 256 |
Minimum glyph size (pixels) | 0×17 |
Maximum glyph size (pixels) | 17×17 |
Access mode | Indexed |
Metadata? | None |
Bitmap glyphs? | Yes |
Vector glyphs? | No |
Compressed glyphs? | Yes |
Hidden data? | Yes |
Games |
The font used in Cover Girl Strip Poker is a file called FONT.PPP. Like all .PPP files in the game, the entire file is compressed with a run-length encoding algorithm.
Note that this is not the game's main gameplay font. It is only used for the screen where you give your name, and for the looping credits text on the opening screen. Said gameplay font is not in any file, and is most likely embedded in the .EXE file
File format
The font has a fixed internal size of 17×17, but has variable character widths. It can contain 255 characters, ranging from 0x00 to 0xFE. However, the space character present in the font data does not appear to be used. The width for index 0xFF of the font contains a value that seems to be the width for the space character, but the game's space width does not change when it's modified.
Compression
Like all .PPP files, the file is compressed with a flag-based run-length encoding algorithm. This is described on the Nova Format page. The file should be uncompressed before being interpreted.
Header
The font format has no real header, but instead has the following structure:
Offset | Data type | Name | Description |
---|---|---|---|
0x00 | BYTE[0x100] | Mapping | Indicates for each symbol which image index from Images to use. |
0x100 | BYTE[0x100] | Widths | Indicates for each symbol what width to take from the image specified in the Mapping array. |
0x200 | BYTE[289*NrOfImages] | Images | An array of 8-bit 17×17 images. |
The number of images (referenced as NrOfImages above) can be determined by taking the size of the uncompressed data, subtracting 0x200, and then dividing it by 289 (17*17). The highest value that should be allowed in Mapping is NrOfImages - 1
. Alternatively, the highest value in Mapping could be used to determine the number of images.
The very last index in both arrays does not appear to be used. As mentioned, the final index in Widths appears to contain the width for the space character, which would be useful to ensure one less image needs to be saved. However, the game does not seem to use this value, and simply has its space width hardcoded to 4 pixels. Not to mention, the compression would completely compensate for adding the extra image, since 289 bytes of value 0x00 would easily be taken into a single repeat-command combined with the start of the data of the next image.
Image data
The actual font images are all 8-bit indexed images with dimensions 17×17. The values in the Widths array restrict that width.
To get the image data for a symbol at index i
, take the 289 bytes at offset 0x200 + (289*Mapping[i])
, and then cut off the image at the width specified at Widths[i]
.
Optimisation
Being an indexed format, the font can be optimised to remove duplicate symbols; any two images with the same bytes after expanding it to a 17×17 image can be saved only once, by making the index refer to the same image twice.
In fact, the original font file technically has all unused symbols saved as referring to image #0, only with its width reduced to 0.
Tools
The following tools are able to work with files in this format.
Name | Platform | View images in this format? | Convert/export to another file/format? | Import from another file/format? | Access hidden data? | Edit metadata? | Notes |
---|---|---|---|---|---|---|---|
Westwood Font Editor | Windows | Yes | Yes | Yes | No | N/A | Offers optimisation as save option. |