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.


๐Ÿ“ฅ Download & Run

You need two files:

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

python fxconv-main.py ...

On the template, that would be

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.


Converting Fonts

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

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

Examples

Proportional Font (like Shmup)

fxconv --font font_shmup.png -o shmup.py \
  --py name:font_shmup charset:print grid.size:10x13 proportional:true

Monospaced Font (like Numworks)

fxconv --font numworks.png -o numworks.py \
  --py name:font_numworks charset:print grid.size:10x16 proportional:false

Converting Images

For fx-CG and ClassPad (color)

fxconv --bopti-image myimage.png -o image.py \
  --cg profile:p4_rgb565 name:image --py

For fx-9860G (B&W)

fxconv --bopti-image myimage.png -o image.py \
  --fx profile:mono name:image --py

Compact Format (shorter file)

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

Command Structure

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.


Advanced

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.


Source and Docs

๐Ÿ‘‰ fxconv on git.planet-casio

๐Ÿ‘‰ fxsdk on planet-casio (french)