ctr_FontConverterConsole

Description

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.

Font Licenses

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 the CTR SDK do not include font licenses of any kind.

Using the Tool

Commands

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.

Input options

Use the following options with <input option> according to the <input format>.

Input: Image (-i image)

OptionsOmittabilityComments
-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.
-iaPossible 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 is read as input according to the letter order file xlor/cp1252.xlor. The BMP color is interpreted using the LA8 format.

Input: bcfnt (-i bcfnt)

OptionsOmittabilityComments
-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.

Input: Windows フォント (-i win)

OptionsOmittabilityComments
-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.
Alpha2 levels16 levels64 levels
Alpha onlyA1A4A6
Brightness and alphaLA1LA4LA6
-iaPossible Output using software anti-aliasing if specified.
-it <character width>Possible Specify one of the following for <character width>. If omitted, char is assumed.
Character WidthDescription
glyphUses the glyph width as the character width.
keepsp The character width specified for the font is used for spaces, while the glyph width is used as the character width in all other cases.
charUses the character width specified for the font.
fixedUses the same width for all characters.
-iw <monospace width>Possible/Impossible Required when -it fixed is specified. Invalid in all other cases.

Example:

-i win -in "MS Gothic" -is 16 -ic A6 -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.

Output options

The following options can be used with <output option>, according to the <output format>.

Output: Image (-o image)

OptionsOmittabilityComments
-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.
Image formatDescription
extDetermines the format based on the image file extension.
bmpOuput is made in BMP format.
tgaOuput is made in TGA format.
-ogPossible 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, then outputs the image to font.bmp without a grid.

Output: bcfnt (-o bcfnt)

OptionsOmittabilityComments
-oe <character code>Possible Specify one of the following for <character code>. If omitted, unicode is assumed.
Character CodesDescription
unicodeSpecifies Unicode.
sjisSpecifies ShiftJIS.
cp1252Specifies a CP1252.
-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 alternate character.

Revision History

2010/09/14
Initial version.

CONFIDENTIAL