Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

A tool for converting fonts to NICO Game Framework format fonts.

License

Notifications You must be signed in to change notification settings

TakWolf-Deprecated/nico-font-tool.python

Repository files navigation

NICO Font Tool - Python

Python PyPI

A tool for converting fonts to NICO Game Framework format fonts.

This is the Python version. The Nim version see: nico-font-tool.

Installation

pip install nico-font-tool

Usage

Command

Use nicofont -h to learn more.

nicofont assets/fonts/quan/quan.ttf build/demo quan --font_size 8

Scripts

See: demo

import nico_font_tool

sheet_data, alphabet = nico_font_tool.create_sheet(
    font_file_path='your/font/file/path.ttf', 
    font_size=8,
)

nico_font_tool.save_palette_png(sheet_data, 'outputs/palette/dir', 'outputs_name')
nico_font_tool.save_dat_file(alphabet, 'outputs/palette/dir', 'outputs_name')
    
nico_font_tool.save_rgba_png(sheet_data, 'outputs/rgba/dir', 'outputs_name')
nico_font_tool.save_dat_file(alphabet, 'outputs/rgba/dir', 'outputs_name')

Dependencies

License

Under the MIT license.