The ctr_FontConverterConsole tool can be used to display any font installed on a PC as text on CTR.
ctr_FontConverterConsole is a command line version of ctr_FontConverter (hereafter referred to as the "GUI version"). Other than differences in the interface, functionality is equivalent to the GUI version. This tool is intended for use in Makefiles and batchfiles.
ctr_FontConverterConsole can convert any font installed on a PC for use on the CTR. However, a user license may be required to use such fonts in game software that will be sold. Acquire the appropriate licenses for each game application. ctr_FontConverterConsole and CTR SDK do not include font licenses of any kind.
ctr_FontConverterConsole.exe -i <input format> <input option> -o <output format> <output option> [‑f <character filter file path>]
As shown in , -i, -o, and -f are used to specify input, output, and filter options, respectively.
<input option> and <output option> change based on the specifications for <input format> and <output format>, respectively. These elements are discussed in subsequent sections.
Enclose elements that contain spaces between words with quotation marks ("). (Example "parameter with spaces".) Quotation marks cannot be used inside of quotation marks.
Use the following options with <input option> according to the <input format>.
| Options | Omittability | Comments |
|---|---|---|
| -if <image file path> | Impossible | |
| -io <letter order file path> | Impossible | |
| -ic <color format> | Impossible | Specify one of the following for <color format>: A4, A8, LA4, LA8, RGB565, RGB5A1, RGBA4, RGB8, or RGBA8. |
| -ia | Possible | Executes linear interpolation countermeasure processing if specified. |
Example:
-i image -if font.bmp -io xlor/cp1252.xlor -ic LA8
As shown above, the BMP file font.bmp will be read as input according to the letter order file xlor/cp1252.xlor. The BMP color will be interpreted using LA8 format.
| Options | Omittability | Comments |
|---|---|---|
| -if <font file path> | Impossible | Specifies a bcfnt or bcfna file. |
Example:
-i bcfnt -if font.bcfnt
Accepts the bcfnt file named font.bcfnt as input.
| Options | Omittability | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| -in <font name> | Impossible | |||||||||||||
| -is <font size> | Impossible | The conversion source font size in pixel units. | ||||||||||||
| -isw <average witdh> | Possible | Specifies the average width in pixels. The aspect ratio can be changed by making this specification. | ||||||||||||
| -ic <number of gradations> | Impossible |
Specify any one of A1 through LA6 given below for <number of gradations>. A8 or LA8 format results when the texture format used to output the bcfnt is 64 levels. A4 or LA4 results in all other cases.
|
||||||||||||
| -ia | Possible | Output using software anti-aliasing if specified. | ||||||||||||
| -it <character width> | Possible |
Specify one of the following for <character width>. If omitted, char is assumed.
|
||||||||||||
| -iw <monospace width> | Possible/Impossible | Required when -it fixed is specified. Invalid in all other cases. |
Example:
-i win -in "MS Gothic" -is 16 -ib 4 -it glyph
Data is loaded using Windows MS Gothic font with a size of 16 pixels and 64 gradations alpha only (=A6). The glyph width is used for the character width.
The following options can be used with <output option>, according to the <output format>.
| Options | Omittability | Comments | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| -of <image file path> | Impossible | Unlike the GUI version, the command line version does nothing if the image format and file extension do not match. Output is made using the specified file name. | ||||||||
| -oo <letter order file path> | Impossible | |||||||||
| -oi <image format> | Possible |
Specifies the image file format to be output. Specify one of the following for <image format>. If omitted, ext is assumed.
|
||||||||
| -og | Possible | No grid if specified. | ||||||||
| -ow <cell width> | Possible | The default specifies a width sufficient for output. Cannot be specified concurrently with -or or -ob. | ||||||||
| -oh <cell height> | Possible | The default specifies a height sufficient for output. Cannot be specified concurrently with -or or -ob. | ||||||||
| -ol <cell left margin width> | Possible | The default is 0. | ||||||||
| -or <cell right margin width> | Possible | The default specifies the same value as -ol. Cannot be specified concurrently with -ow or -oh. | ||||||||
| -ot <cell top margin width> | Possible | The default is 0. | ||||||||
| -ob <cell bottom margin width> | Possible | If omitted, the same value as specified for -ot is assumed. Cannot be specified concurrently with -ow or -oh. | ||||||||
| -ocg <grid color> | Possible | Specifies the color as a 6-digit hexadecimal. Treated as 000000 if omitted. | ||||||||
| -ocm <margin color> | Possible | Specifies the color as a 6-digit hexadecimal. Treated as 99AA99 if omitted. | ||||||||
| -ocw <width line color> | Possible | Specifies the color as a 6-digit hexadecimal. Treated as FF0000 if omitted. | ||||||||
| -ocn <null color> | Possible | Specifies the color as a 6-digit hexadecimal. Treated as FF7F7F if omitted. |
Example:
-o image -of font.bmp -oo xlor/cp1252.xlor -og -ol 1 -ot 3
The above specifications apply a 1 pixel margin to the left and right and a 3 pixel margin to the top and bottom of each cell according to the letter order file xlor/cp1252.cxlor.
| Options | Omittability | Comments | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| -oe <character code> | Possible |
Specify one of the following for <character code>. If omitted, unicode is assumed.
|
||||||||
| -op <glyph group file> | Possible | No grouping (no compression) if omitted. | ||||||||
| -os <sheet size> | Possible | Specifies the sheet size as a number of pixels in units of 1000's of pixels. A power of two greater than or equal to 16 and less than or equal to 1024 must be specified for <sheet size>. Sheet size is determined automatically if omitted. | ||||||||
| -oa <alternate character> | Possible | The default is based on the input. | ||||||||
| -oh <line feed width> | Possible | The default is based on the input. | ||||||||
| -ol <default left space> | Possible | The default is based on the input. | ||||||||
| -ow <default glyph width> | Possible | The default is based on the input. | ||||||||
| -or <default right space> | Possible | The default is based on the input. |
Example:
-o bcfnt -of font.bcfnt -os 256 -oe sjis -oa ?
Outputs data to font.bcfnt using a sheet size of 256K pixels, Shift_JIS encoding and ’?’ as the substitute character.
CONFIDENTIAL