Skip to content

SAFontEdit

PkR edited this page May 9, 2024 · 14 revisions

SAFontEdit is an editor and import/export tool for font files in various versions of Sonic Adventure/DX and Sonic Adventure 2/Battle/PC.

Supported files

Font files in different versions of SA1 and SA2 come in various formats and their data is stored in different ways. There can also be files that share the same name but their format is different between games. When you open a font file, the editor will show a dialog asking you to select the format and character map. If you haven't renamed the file, SAFontEdit should be able to recognize it by name and content and set the necessary parameters automatically. For manual format settings, use the table below. Details on the format are below the table.

Filename Games Data Format Character map Location Notes
EFMSGFONT_ASCII24E.BIN SA1 DC, SA2 DC, SADX GC, SA2B GC, SADX PC (2004) Simple 1bpp ANSI 1252 (Trimmed) SA1 DC: Inside 1ST_READ.BIN (exported by SA Tools Hub to the Misc folder); SADX: In the game's main data folder (GC) or the system folder (PC); SA2 DC: in the SONIC2 folder. 'Impress' font used for English strings.
EFMSGFONT_ASCII24S.BIN SA1 DC, SA2 DC, SADX GC, SA2B GC,SADX PC (2004) Simple 1bpp ANSI 1252 (Trimmed) See above 'Comic Sans' font used for strings in European languages other than English (SA1) and English+other languages (SA2).
EFMSGFONT_KANJI24.BIN SA1 DC, SA2 DC, SADX GC, SA2B GC, SADX PC (2004) Simple 1bpp Kanji Font (Old) See above Font for Japanese Kanji.
FONTDATA0.BIN SADX PC (2004) FONTDATA SHIFT-JIS (50220) for US/JP/EU versions, Unicode (1200) for the Korean version. The game's system folder Contains Japanese SHIFT-JIS and English ASCII. The Korean version has multiple parts of the Unicode Basic Multilingual Plane.
FONTDATA1.BIN SADX PC (2004) FONTDATA ANSI (1252) The game's system folder Contains characters for the font used for languages other than English and Japanese.
EFMSGFONT_ASCII24E.BIN SA2 PC Simple 32bpp ANSI 1252 (Trimmed) resource\gd_PC Contains characters for English.
EFMSGFONT_ASCII24S.BIN SA2 PC Simple 32bpp ANSI 1252 (Trimmed) resource\gd_PC 'Comic Sans' font used for strings in European languages other than English (SA1) and English+other languages (SA2).
EFMSGFONT_KANJI24.BIN SA2 PC Simple 32bpp Kanji Font (Old) resource\gd_PC Font for Japanese Kanji.
SOC_fontdata0.BIN SADX X360 Simple 32bpp Kanji Font (SOC) The game's system folder Replacement for the 2004 version's FONTDATA0 file but in a plain format.
SOC_fontdata1.BIN SADX X360 Simple 32bpp ANSI (1252) The game's system folder Replacement for the 2004 version's FONTDATA1 file but in a plain format.

Data formats

There are three main formats for binary font files in SADX and SA2. There are also DDS textures containing font graphics, which the editor doesn't cover. image

  1. Simple 1 bit per pixel: these contain bitmap data with 8 pixels packed into a single byte. There is no color or alpha information, so every pixel is either completely opaque or completely transparent. This format is used by Dreamcast and Gamecube versions of SA1 and SA2/B. EFMSGFONT files are in this format in all games except SA2 PC.
  2. FONTDATA (2004) format: these contain 1-bit bitmap data along with character IDs and miscellaneous data. These are called FONTDATA0.BIN and FONTDATA1.BIN and are only used in the 2004 PC port of SADX. Note that SOC_fontdata files in SADX X360 are not in this format despite containing "fontdata" in their names.
  3. Simple 32 bit per pixel: these also contain bitmap data, but each pixel occupies 4 bytes. There is full color and alpha information. These are used by SOC_fontdata files in SADX X360 and EFMSGFONT files in SA2 PC.

Character maps

In principle, only the data format is necessary for the editor to be able to open and save the file properly. However, by setting the correct character map you can navigate the file more easily.

image

Main window

image

The list box on the left lets you go to different characters. The items on the list are the character ID followed by the actual character (if it exists in the current character map).

The "Zoom" trackbar lets you zoom in or out to make glyph editing easier.

The "Color" box and the numeric boxes on the right let you change the current color (for 32-bit formats only). You can click the colored box to bring up the Windows color dialog. Use the A numeric box to adjust transparency.

The glyph box lets you view and edit font bitmaps. Use the left mouse button to paint with the current color, and the right mouse button to erase.

The "Search" box on the top right lets you search characters by ID or the actual character (if the correct character map is loaded).

The "Import PNG" and "Export PNG" buttons let you import and export current character image as PNG files.

Import and export

Apart from importing and exporting a single character, you can use the "File" menu to export all characters as individual images or as font sheets. You can also import back font sheets that were exported previously.