Skip to content

SKFONT.CG

Gong Xian edited this page Sep 4, 2023 · 13 revisions

Font data is contained in SKFONT.CG. This is a raw bitmap file with no header or footer.

Tiles are comprised of 338 bytes. Each character is a 26 x 26 tile, with each tile being a 4-bit grayscale image—0 is transparent and F is opaque. The tile data is 26 bytes in 13 rows, with each byte representing two pixels defined by a nybble, stacked vertically. The upper pixel is contained in the right nybble and the lower pixel in the left nybble—e.g. the byte 0F represents a fully opaque pixel above a transparent pixel.

This repository contains Mr. SKFONT, a tile editor created in wxPython for the express purpose of editing SKFONT.CG. Instructions can be found in the Scripts/gui directory of this repository. Its interface is modeled after CrystalTile2, which was previously the only tile editor that was capable of viewing the data in SKFONT.CG, albeit in a limited fashion.

The contents of SKFONT.CG are written into memory at 8ccd7ec0. Tiles that will not be used for translation purposes can be reused arbitrarily (e.g. for custom code) and pointed to with offsets starting at this address.

Notable Locations

Some of the descriptions of the tiles at these locations may not be accurate, and instead are suggestions for what to use as replacements.

Location Contents
0xC216 Numbers 0-9
0xCF4A Upper-case letters A-Z
0xF19E Lower-case letters a-z
0x548 Period .
0x3F6 Comma ,
0x7EC Colon :
0x93E Semicolon ;
0xA90 Question mark ?
0xBE2 Exclamation point !
0xFD8 Single quotation mark '
0x127C Double quotation mark "
0x23A6 En dash
0x24F8 Em dash
0x264A Dash -
0x30DA Opening single quotation mark
0x322C Closing single quotation mark
0x337E Opening double quotation mark
0x34D0 Closing double quotation mark
0x66FC Yen sign
0x684E Dollar sign $
0x6C44 Number sign #
0x6D96 Percent sign %
0x6EE8 And sign &
0x703A Asterisk *
0x718C At sign @
0x8D46 ?!
0x8E98 !!
0x28998 The largest block of kanji begins at this address through the end of the file. This character, 亜, has the Shift-JIS codepoint 0x889F. These can be used for any purpose where simple text replacement isn't possible, such as map labels defined in scripts. Refer to this table starting at the second column at the 88 9e row.
0x11D5A4 Blank space.