Font Converter
The Font Converter is a command-line tool.
Usage
font_converter <param 1> <param 2> ...
Description
Input File Parameter
--input_truetypeor-it, optional (1) : TrueType/OpenType Font file. Converts a TrueType/OpenType font file into a Murl font resource.--input_imageor-ii, optional (1) : A font strip image containing all glyphs on a single line. Converts a font strip image into a bitmap font (texture and Murl font file).--input_codesor-ic, optional (2) : A text file containing characters as a semicolon-separated list of UTF16 hex codes. For bitmap fonts, the list must match the input image file. For TrueType fonts the list contains the characters to include into the generated font. If the--exclude_modeparameter is set, the list contains the characters to exclude from the generated font. Prior to processing, the string gets trimmed and the characters line feed (\n) and carriage return (\r) get removed.--input_asciior-ia, optional (2) : A text file containing characters as a string of UTF8 characters. For bitmap fonts, the list must match the input image file. For TrueType fonts the list contains the characters to include into the generated font. If the--exclude_modeparameter is set, the list contains the characters to exclude from the generated font. Prior to processing, the string gets trimmed and the characters line feed (\n) and carriage return (\r) get removed.
(1) Either parameter --input_truetype or parameter --input_image must be specified.
(2) If --input_image is used, either parameter --input_codes or parameter --input_ascii must be specified.
Output File Parameter
--output_fontor-of, mandatory : The name of the font file to generate, containing all individual glyph positions and sizes within the output image (bitmap font) or the vector font data (TrueType/OpenType font).--output_imageor-oi, optional (3) : The name of the texture image to generate
(3) Is mandatory when creating bitmap fonts (--input_image) and not considered otherwise.
General Optional Parameter
--verboseor-vb, optional, switch : It set, additional information about the generated font are printed into the console.--scale_factoror-c, optional : Overall scale factor--base_lineor-b, optional : Font baseline, specified in pixels from the top of the input image in the downward direction. When specified, both–ascentand–descentmust also be given.--ascentor-a, optional : Font ascent, specified in (positive) pixels from the baseline in the upward direction. When specified, both–base_lineand–descentmust also be given.--descentor-d, optional : Font descent, specified in (positive) pixels from the baseline in the downward direction. When specified, both–base_lineand–ascentmust also be given.--spacingor-s, optional : Font spacing; this is the number of pixels to advance from one character to the next one in X direction--leadingor-l, optional : Font leading; this is the number of pixels to advance from one text line to the next one in Y direction--space_widthor-sw, optional : The width of the space character in pixels--digit_widthor-dw, optional : The custom width of all the digits (0-9) in pixels--horizontal_offsetor-ho, optional : Horizontal character offset in pixels--vertical_offsetor-vo, optional : Vertical character offset in pixels
Optional Bitmap Parameter
These parameters are only considered for Bitmap-Fonts (--input_image).
--output_compressionor-oc, optional : The compression of the texture image to generate[DEFAULT | BEST]--rasteror-r, optional : Overall position and size raster--matte_coloror-mc, optional : Matte color for the input image in formatR[f|i|h], G[f|i|h], B[f|i|h] | RRGGBBh--matte_thresholdor-mt, optional : The alpha threshold value for applying the matte color in range 0 - 255 (default 8)--search_thresholdor-st, optional : The alpha threshold value for splitting the input image to individual glyphs in range 0 - 255 (default 0)--crop_thresholdor-ct, optional : The alpha threshold value for cropping the individual glyphs in range 0 - 255 (default 5)--crop_input_imageor-ci, optional, switch : If set, the input image is vertically cropped using the crop threshold for determining the font height when--ascent/--descent/--base_lineare not given.--none_power_of_two_height-nh, optional, switch : If set, the output image is cropped vertically. The resulting image height is not power of two (in most cases).
Optional TrueType/OpenType Parameter
These parameters are only considered for TrueType/OpenType-Fonts (--input_truetype).
--exclude_modeor-ex, optional, switch : If set, the characters provided with--input_codesor--input_asciiget excluded from the generated font.
Examples
Bitmap Font
Converts a font strip image into a texture and a corresponding Murl font file.
The font converter extracts the individual glyphs from the font strip image and maps it to the characters of the text file. The bitmap information is stored in a texture atlas. The individual glyph positions and sizes are stored in a Murl font file.
TrueType/OpenType Font
Converts all characters from the TrueType font into a Murl font resource.
Converts all characters from the OpenType font that are listed in the file character_set.txt into a Murl font resource.
Converts all characters from the TrueType font that are not listed in the file character_set.txt into a Murl font resource.