Skip to content

fxconv

fxconv is a tool from the fxSDK that converts images and fonts for use with gint and PythonExtra.

It outputs .py files that can be directly imported into your programs.


You need two files:

Save them into a folder and run the tool like this:

Terminal window
python fxconv-main.py ...

On the template, that would be

Terminal window
python fxconv/fxconv-main.py ...

You should create an alias for fxconv that’s your python fxconv/fxconv-main.py. That would later be used on this reference as fxconv.


Use the --font type to create a gint.font() object.

Terminal window
fxconv --font font_shmup.png -o shmup.py \
--py name:font_shmup charset:print grid.size:10x13 grid.padding:0 grid.border:0 proportional:true
OptionDescription
--fontConvert an image to a bitmap font
--pyOutput PythonExtra format (.py)
--py-compactMinimize output with raw bytes (non-editable)
name:NAMEName of the variable in the .py file
charset:printUse printable characters (ASCII 32–126)
grid.size:WxHSize of one glyph (in pixels)
grid.padding:0Spacing between glyphs
grid.border:0Border around the grid
proportional:true/falseUse variable widths or monospaced
Terminal window
fxconv --font font_shmup.png -o shmup.py \
--py name:font_shmup charset:print grid.size:10x13 proportional:true
Terminal window
fxconv --font numworks.png -o numworks.py \
--py name:font_numworks charset:print grid.size:10x16 proportional:false

Terminal window
fxconv --bopti-image myimage.png -o image.py \
--cg profile:p4_rgb565 name:image --py
Terminal window
fxconv --bopti-image myimage.png -o image.py \
--fx profile:mono name:image --py
Terminal window
fxconv --bopti-image myimage.png -o image.py \
--cg profile:p4_rgb565 name:image --py --py-compact

Terminal window
fxconv [TYPE] input.png -o output.py [--fx|--cg] [--py] [parameters...]
TypeDescription
--fontBitmap font
--bopti-imageImage for drawing (monochrome/color)

Use --fx for black-and-white, --cg for fx-CG/fx-CP models.


If TYPE is omitted, fxconv will look for a fxconv-metadata.txt file. That’s mostly for C add-ins and not needed with PythonExtra.


👉 fxconv on git.planet-casio

👉 fxsdk on planet-casio (french)