nico-font-tool


Namenico-font-tool JSON
Version 0.0.6 PyPI version JSON
download
home_page
SummaryA tool for converting fonts to NICO Game Framework format fonts.
upload_time2023-06-01 10:48:53
maintainerTakWolf
docs_urlNone
authorTakWolf
requires_python>=3.11
licenseMIT License
keywords nico game-engine font
VCS
bugtrack_url
requirements fonttools Brotli bdffont Pillow pypng pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NICO Font Tool - Python

[![Python](https://img.shields.io/badge/python-3.11-brightgreen)](https://www.python.org)
[![PyPI](https://img.shields.io/pypi/v/nico-font-tool)](https://pypi.org/project/nico-font-tool/)

A tool for converting fonts to [NICO Game Framework](https://github.com/ftsf/nico) format fonts.

This is the Python version. The Nim version see: [nico-font-tool](https://github.com/TakWolf/nico-font-tool).

## Installation

```commandline
pip install nico-font-tool
```

## Usage

### Command

Use `nicofont -h` to learn more.

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

### Scripts

See: [demo](examples/demo.py)

```python
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

- [FontTools](https://github.com/fonttools/fonttools)
- [Brotli](https://github.com/google/brotli)
- [BdfFont](https://github.com/TakWolf/bdffont)
- [Pillow](https://github.com/python-pillow/Pillow)
- [PyPNG](https://gitlab.com/drj11/pypng)

## License

Under the [MIT license](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "nico-font-tool",
    "maintainer": "TakWolf",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "nico,game-engine,font",
    "author": "TakWolf",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/2f/30/06c486574e5d2af6b44eb30ac676e4590a059b0e94a138272b6f959b5b4c/nico-font-tool-0.0.6.tar.gz",
    "platform": null,
    "description": "# NICO Font Tool - Python\n\n[![Python](https://img.shields.io/badge/python-3.11-brightgreen)](https://www.python.org)\n[![PyPI](https://img.shields.io/pypi/v/nico-font-tool)](https://pypi.org/project/nico-font-tool/)\n\nA tool for converting fonts to [NICO Game Framework](https://github.com/ftsf/nico) format fonts.\n\nThis is the Python version. The Nim version see: [nico-font-tool](https://github.com/TakWolf/nico-font-tool).\n\n## Installation\n\n```commandline\npip install nico-font-tool\n```\n\n## Usage\n\n### Command\n\nUse `nicofont -h` to learn more.\n\n```commandline\nnicofont assets/fonts/quan/quan.ttf build/demo quan --font_size 8\n```\n\n### Scripts\n\nSee: [demo](examples/demo.py)\n\n```python\nimport nico_font_tool\n\nsheet_data, alphabet = nico_font_tool.create_sheet(\n    font_file_path='your/font/file/path.ttf', \n    font_size=8,\n)\n\nnico_font_tool.save_palette_png(sheet_data, 'outputs/palette/dir', 'outputs_name')\nnico_font_tool.save_dat_file(alphabet, 'outputs/palette/dir', 'outputs_name')\n    \nnico_font_tool.save_rgba_png(sheet_data, 'outputs/rgba/dir', 'outputs_name')\nnico_font_tool.save_dat_file(alphabet, 'outputs/rgba/dir', 'outputs_name')\n```\n\n## Dependencies\n\n- [FontTools](https://github.com/fonttools/fonttools)\n- [Brotli](https://github.com/google/brotli)\n- [BdfFont](https://github.com/TakWolf/bdffont)\n- [Pillow](https://github.com/python-pillow/Pillow)\n- [PyPNG](https://gitlab.com/drj11/pypng)\n\n## License\n\nUnder the [MIT license](LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A tool for converting fonts to NICO Game Framework format fonts.",
    "version": "0.0.6",
    "project_urls": {
        "homepage": "https://github.com/TakWolf/nico-font-tool.python",
        "issues": "https://github.com/TakWolf/nico-font-tool.python/issues",
        "source": "https://github.com/TakWolf/nico-font-tool.python"
    },
    "split_keywords": [
        "nico",
        "game-engine",
        "font"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94f1a6b43f7e08d9b7b3655f3a25e46be8ca65cdf1883caaefee3cc278f4b91e",
                "md5": "8c73f01ce8aae3955621fda41dc69c91",
                "sha256": "9309ac481468ead22210aef023be916ec8dbbab494e581bbd1c44d8df6cf2064"
            },
            "downloads": -1,
            "filename": "nico_font_tool-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c73f01ce8aae3955621fda41dc69c91",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 7689,
            "upload_time": "2023-06-01T10:48:51",
            "upload_time_iso_8601": "2023-06-01T10:48:51.760212Z",
            "url": "https://files.pythonhosted.org/packages/94/f1/a6b43f7e08d9b7b3655f3a25e46be8ca65cdf1883caaefee3cc278f4b91e/nico_font_tool-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f3006c486574e5d2af6b44eb30ac676e4590a059b0e94a138272b6f959b5b4c",
                "md5": "d7218e5f911a23c9e7ca043d1c299b35",
                "sha256": "1482e243928f081053d317d407019714663716d97a9ed5f2790a2d0e3830d721"
            },
            "downloads": -1,
            "filename": "nico-font-tool-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "d7218e5f911a23c9e7ca043d1c299b35",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 6531,
            "upload_time": "2023-06-01T10:48:53",
            "upload_time_iso_8601": "2023-06-01T10:48:53.077075Z",
            "url": "https://files.pythonhosted.org/packages/2f/30/06c486574e5d2af6b44eb30ac676e4590a059b0e94a138272b6f959b5b4c/nico-font-tool-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-01 10:48:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TakWolf",
    "github_project": "nico-font-tool.python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "fonttools",
            "specs": [
                [
                    "==",
                    "4.39.4"
                ]
            ]
        },
        {
            "name": "Brotli",
            "specs": [
                [
                    "==",
                    "1.0.9"
                ]
            ]
        },
        {
            "name": "bdffont",
            "specs": [
                [
                    "==",
                    "0.0.10"
                ]
            ]
        },
        {
            "name": "Pillow",
            "specs": [
                [
                    "==",
                    "9.5.0"
                ]
            ]
        },
        {
            "name": "pypng",
            "specs": [
                [
                    "==",
                    "0.20220715.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "7.3.1"
                ]
            ]
        }
    ],
    "lcname": "nico-font-tool"
}
        
Elapsed time: 0.07071s