Chronotools - fonts and character sets


0. Contents

   1. Introduction
   2. Terms
      2.1. Script character set
      2.2. 12pix font mapping
      2.3. 8pix font mapping
      2.4. 12pix font file
      2.5. 8pix font file
      2.6. VWF8 font file (optional)
      2.7. Locked symbols
      2.8. Typefaces
   3. Constraints
      3.1. Character set limits
         3.1.1. Limits in the 8pix font
            3.1.1.1. Reserved slots (in character set)
            3.1.1.2. Reserved slots (in tilemap)
            3.1.1.3. Usable slots
         3.1.2. Limits in the 12pix font
      3.2. The positional constraints
   4. Hints
   5. The VWF8 character mapping

1. Introduction

Chronotools has been designed to allow as much localization of Chrono Trigger as possible. This includes the possibility of using nearly any character set besides the English one.

2. Terms

In this document (and many others), the following terms are used.

2.1. Script character set

This encoding is your system-dependent encoding of characters to byte values. It is used in your script files and in your configuration file. It is not used in the patch or ROM.

The name of this encoding is written to the characterset field in your configuration file.
Some possible values include:
iso-8859-1 Western European encoding, aka. "latin1"
iso-8859-2 Polish, Czech, Slovak, Slovenia, Hungarian
iso-8859-5 Cyrillic encoding: Russian, Ukrainian, Belarusian
iso-8859-7 Greek encoding
iso-8859-8 Modern Hebrew encoding
iso-8859-9 Turkish, Maltese, Esperanto
iso-8859-10 Estonian, Latvian, Lithuanian, Greenlandic, Saami
iso-8859-11 Thai
iso-8859-16 Albanian, Croatian, Romanian, Gaelic etc with Euro
windows-1250 Microsoft version of iso-8859-2
windows-1251 Microsoft version of iso-8859-5
windows-1252 Microsoft version of latin1 and latin9
utf-8 The unicode character encoding
shift-jis Microsoft doublebyte Japanese encoding

2.2. 12pix font mapping

This is the array of characters specified using the font12_N settings in your configuration file.
Your 12pix font file (font12fn) must match exactly the contents of this array (excluding the typefaces).
In addition to the font12_N settings, also def12sym settings can be used to specify the contents of the font.

This mapping is used by:

  • Dialog text
  • Player character names (in dialog)
  • Item descriptions (in the item screen)
  • Item names (in the "got X" messages)
  • Monster names (when aiming in battle)
  • Technique descriptions (in the technique screen)
  • Technique names (in the "learned tech X" messages)
  • Location names (in the overworld map)
  • Chapter names (in the save/load screen)
  • Game settings screen help texts
Therefore, all character symbols that appear in those texts must be present in the 12pix font mapping (and consequently, in the 12pix font).

2.3. 8pix font mapping

This is the array of characters specified using the font8_N settings in your configuration file.
Your 8pix font file (font8fn) must match exactly the contents of this array.
In addition to the font8_N settings, also def8sym settings can be used to specify the contents of the font.

This mapping is used by:

  • Player character names (in battle)
  • Item names (in battle and item screen, regardless whether you use VWF8)
  • Monster names (in battle)
  • Technique names (in battle and tech screen, regardless whether you use VWF8)
  • Status screen messages
Therefore, all character symbols that appear in those texts must be present in the 8pix font mapping (and consequently, in the 8pix font).

2.4. 12pix font file

This font file contains the actual character symbols of the 12pix font. When you edit it, please remember the restrictions listed in the image format guide and that it must match the contents of the font12_N map.

2.5. 8pix font file

This font file contains the actual character symbols of the constant-width 8pix font (used for most of the status screen content). When you edit it, please remember the restrictions listed in the image format guide and that it must match the contents of the font8_N map.

2.6. VWF8 font file (optional)

This font file contains the actual character symbols of the variable-width 8pix font (used for the aspects you select it for). When you edit it, please remember the restrictions listed in the image format guide.
Constraints for its character mapping are explained later in this document.

2.7. Locked symbols

When a symbol is "locked", using the lock12syms or lock8syms directive in the configuration file, it means that the position of the symbol in question will not be changed in the font in question.
This is useful for symbols that have positional constraints. These symbols are:
  • Symbols that are used in strings that are displayed using different fonts (explained later in this document).
  • Symbols that are referred by the game code (for example, the star symbol and numbers in the 8pix font).
  • Custom graphics you use using the [gfx] declaration in your *r section of the script file.

2.8. Typefaces

Typeface in Chronotools is a technique to provide the same 12pix text in different font styles. An example typeface could be italic.

This is accomplished by copying a region of the font to a different location in the font, editing it and then declaring it in the configuration file using the typeface statement.

3. Constraints

3.1. Character set limits

Due to how Chrono Trigger is built, there are several limitations in how you can build the fonts and character tables.

For understanding the explanations here you need to have rudimentary understanding of hex numbers.

3.1.1. Limits in the 8pix font

The 8pix font has 256 different indexes - $00 to $FF for characters. There's no way around it. But not all of them can be used freely.
3.1.1.1. Reserved slots (in character set)
This list tells which symbols may not be used in 8pix character set, because they already have different meanings.
  • Indexes $00-$0F are reserved for control bytes.
  • Indexes $2A-$2F are used internally by the game.
  • Indexes $40-$68 are used by Japanese legacy code (voiced versions of $80..$A8), unless the feature is disabled in configuration.
  • Indexes $5B-$5C are used by item scrolling screens.
  • Indexes $60-$63 are used by the item cursor.
  • Indexes $67-$6F are used by the health and tech gauges.
  • Indexes $69-$72 are used by Japanese legacy code (semivoiced versions of $80..$89), unless the feature is disabled in configuration.
  • Indexes $73-$7C are used by the status numbers, if you enable use_thin_numbers.
I'm not sure of the status of areas $10-$1F and $30-$3F.
3.1.1.2. Reserved slots (in tilemap)
This list tells which slots from the 8pix tilemap can not be used, because they are already used for something else.
  • Indexes $00-$0B are reserved by elemental symbol graphics
  • Indexes $15-$1F are reserved by VWF8, if you use VWF8.
  • Indexes $2A-$2F are used internally by the game.
  • Indexes $30-$5B are reserved by VWF8, if you use VWF8.
  • Indexes $5B-$5C are used by item scrolling screens.
  • Indexes $5C-$66 are reserved by VWF8, if you use VWF8.
  • Indexes $60-$63 are used by the item cursor.
  • Indexes $64-$66 are used by Japanese legacy code (normal/voiced/semivoiced markers), unless the feature is disabled in configuration.
  • Indexes $67-$6F are used by the health and tech gauges.
  • Indexes $67-$71 are reserved by VWF8, if you use VWF8.
  • Indexes $73-$7C are used by the status numbers, if you enable use_thin_numbers.
  • Indexes $7D-$9D are reserved by VWF8, if you use VWF8.
3.1.1.3. Usable slots
This leaves the following areas for your use:
  • $40-$5A (27 slots) if you disabled the Japanese legacy code and don't use VWF8
  • $64-$66 (3 slots) if you disabled the Japanese legacy code
  • $73-$7C (10 slos) unless you use use_thin_numbers
  • $7D-$9D (33 slots) unless you use VWF8
  • $9E-$FF (98 slots)
VWF8 needs quite many slots from the tile table (110, to be exact) to draw the symbols on. This is an unavoidable technical limitation.

3.1.2. Limits in the 12pix font

The 12pix font has 768 different indexes - $000 to $2FF for characters.
It was this way in the Japanese version (yes, only 768!), and it wasn't changed in the USA version.
But there are some constraints regarding their use.
  • Indexes $00-$20 are reserved for control bytes.
  • Indexes $21-$9F are reserved for dictionary. You can change the upper number, but it affects the compressibility of your script.
This leaves the following areas for your use:
  • $A0-$2FF (the lower number is determined by your dictionary size, configured by the begin setting in your configuration file.
However, characters in the $100-$2FF range take two bytes of ROM space whereas characters below the $100 marker take only 1 byte. This aspect may well be ignored, because Chronotools automatically rearranges the fonts optimally under the given constraints.

3.2. The positional constraints

This is where it all gets problematic.

Some texts are displayed in multiple fonts. Characters that are used to compose those strings must appear in exactly same positions in all of the fonts the strings are written in.

Character names (Crono, Marle, Lucca and so on) are displayed in 8pix font (equipment screen, save-game) and 12pix font (dialog). Therefore all the characters that may compose their names must be in same slots in both of those fonts.

This restriction applies to all the character symbols that are or could be used in any of the following things:

  • Item names
  • Technique names
  • Monster names
  • Player character names
Generally, this includes all the alphabet symbols as well as some punctuation.

This effectively means the following things:

  • The said set of characters (hereon called as the SET) must all be locked using the lock12syms and the lock8syms directives.
    This prevents Chronotools from moving them around.
  • Characters of the SET must all appear in exactly the same positions in both the font12_N and the font8_N maps.
  • Characters of the SET must all appear in the range that both the 8pix and 12pix fonts can agree on.
    Normally, this means $A0-$FF (96 slots), but the lower limit may be smaller if your dictionary is smaller. It mustn't however spill on the area that is not allowed for the 8pix font.
This restriction may make things difficult for languages that have lots of character symbols. Unfortunately, there's currently no way around it in Chronotools.

4. Hints

  • You should put the symbols that are not part of the SET to outside of the constraint range to increase the number of symbols you can use in the SET.
  • If you use use_thin_numbers, you can use the $D3-$DD range in 8pix font for something else (assuming you don't have numbers in the SET).
    If you do that, you need to explicitly mark the $73-$7C range as numbers in your font8_N table.
    Unfortunately, the $D3-$DD range can not currently be moved in the 12pix font because the game refers to it when it prints numbers. This might be changed in future Chronotools releases.

5. The VWF8 character mapping

Since VWF8 is never used for printing text other than that is under the "positional constraints" rule, the VWF8 character map is practically the same as the 8pix font map. Technically though, it allows 768 symbols just as the 12pix font does.