colossus-ltsm


Namecolossus-ltsm JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryFont, bitmap conversion and visualization tool for embedded systems
upload_time2025-08-23 22:45:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords fonts bitmap converter embedded lcd gui
VCS
bugtrack_url
requirements Pillow
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Colossus_LTSM

[![Website](https://img.shields.io/badge/Website-Link-blue.svg)](https://gavinlyonsrepo.github.io/)  [![Rss](https://img.shields.io/badge/Subscribe-RSS-yellow.svg)](https://gavinlyonsrepo.github.io//feed.xml)  [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/whitelight976)

**Colossus_LTSM** is a Python tool for **converting TrueType fonts** (`.ttf`) into **C/C++ bitmap arrays** and for **visualizing font data** stored in C/C++ header files.  
It is aimed at users working with **embedded systems, LCDs, and GUIs** where compact fonts are needed.

## Features

- Convert `.ttf` fonts to C/C++ arrays
- Adjustable **font size**, **ASCII range**, and **addressing mode**
- Visualize fonts from existing C/C++ headers
- GUI built with **Tkinter**
- Lightweight: only depends on `Pillow`

## Installation

1. [github repository](https://www.github.com/gavinlyonsrepo/Colossus_LTSM)
2. [Pypi package](https://pypi.org/project/colossus-ltsm/)

The program is present in python package index, Pypi.
Install (you can use *pip* or *pipx*) to the location or environment of your choice.

## Libraries

- [Pillow](https://python-pillow.org/) for image processing

## Usage

0. Github repository: Colossus_LTSM
1. PyPI package name: colossus-ltsm
2. Import path: import colossus_ltsm
3. Executable command: colossus

Run the GUI:

```python
colossus
// or directly with Python
 python3 -m colossus_ltsm.colossus_main
```

## Input

- Select a `.ttf` font file
- Set font size Width and Height(e.g., 12, 16, 24)
- Define ASCII range (e.g., 32-126)
- Choose addressing mode (horizontal or vertical)
- Choose C or C++ arrays
- Choose file extension (.h or .hpp)
- Choose font name and file name

## Output

- Generates a C or C++ header file with bitmap arrays
- Example output

```c
// Example Font
// An 8 by 8 character size font starting at 
// ASCII offset 0x30 in ASCII table with 0x02 characters in font. 
// 0 and 1 , size 20 bytes, 4 Control bytes at start.
static const std::array<uint8_t, 20> FontBinaryExample =
{
0x08, 0x08, 0x30, 0x01,   // x-size, y-size, offset, (last character-offset : 0x31-0x30)
0x7C,0xC6,0xCE,0xD6,0xE6,0xC6,0x7C,0x00, // ASCII font data '0' : 0x30
0x18,0x38,0x18,0x18,0x18,0x18,0x7E,0x00 // ASCII font data  '1' : 0x31
};
```

## Configuration file

The configuration file is created on startup and populated by default values.
The file is located at '~/.config/colossus_ltsm/colossus_ltsm.cfg' on Linux systems.

| Setting  | Value |  Default | Note |
| ------ | ------ | ----- | ----- |
| scale | int | 8 | Scale of font displayed  |
| Columns | int |16 | Number of columns of font characters to display|

## Screenshots

![ image ](https://github.com/gavinlyonsrepo/Colossus_LTSM/blob/main/extras/images/screenshot.png)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "colossus-ltsm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "fonts, bitmap, converter, embedded, lcd, gui",
    "author": null,
    "author_email": "Gavin Lyons <glyons66@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/cf/3b/8447dbe46b1a712126f8078f7d0f45e0b7727d1885774e7d7de5c50601a8/colossus_ltsm-0.1.0.tar.gz",
    "platform": null,
    "description": "# Colossus_LTSM\n\n[![Website](https://img.shields.io/badge/Website-Link-blue.svg)](https://gavinlyonsrepo.github.io/)  [![Rss](https://img.shields.io/badge/Subscribe-RSS-yellow.svg)](https://gavinlyonsrepo.github.io//feed.xml)  [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/paypalme/whitelight976)\n\n**Colossus_LTSM** is a Python tool for **converting TrueType fonts** (`.ttf`) into **C/C++ bitmap arrays** and for **visualizing font data** stored in C/C++ header files.  \nIt is aimed at users working with **embedded systems, LCDs, and GUIs** where compact fonts are needed.\n\n## Features\n\n- Convert `.ttf` fonts to C/C++ arrays\n- Adjustable **font size**, **ASCII range**, and **addressing mode**\n- Visualize fonts from existing C/C++ headers\n- GUI built with **Tkinter**\n- Lightweight: only depends on `Pillow`\n\n## Installation\n\n1. [github repository](https://www.github.com/gavinlyonsrepo/Colossus_LTSM)\n2. [Pypi package](https://pypi.org/project/colossus-ltsm/)\n\nThe program is present in python package index, Pypi.\nInstall (you can use *pip* or *pipx*) to the location or environment of your choice.\n\n## Libraries\n\n- [Pillow](https://python-pillow.org/) for image processing\n\n## Usage\n\n0. Github repository: Colossus_LTSM\n1. PyPI package name: colossus-ltsm\n2. Import path: import colossus_ltsm\n3. Executable command: colossus\n\nRun the GUI:\n\n```python\ncolossus\n// or directly with Python\n python3 -m colossus_ltsm.colossus_main\n```\n\n## Input\n\n- Select a `.ttf` font file\n- Set font size Width and Height(e.g., 12, 16, 24)\n- Define ASCII range (e.g., 32-126)\n- Choose addressing mode (horizontal or vertical)\n- Choose C or C++ arrays\n- Choose file extension (.h or .hpp)\n- Choose font name and file name\n\n## Output\n\n- Generates a C or C++ header file with bitmap arrays\n- Example output\n\n```c\n// Example Font\n// An 8 by 8 character size font starting at \n// ASCII offset 0x30 in ASCII table with 0x02 characters in font. \n// 0 and 1 , size 20 bytes, 4 Control bytes at start.\nstatic const std::array<uint8_t, 20> FontBinaryExample =\n{\n0x08, 0x08, 0x30, 0x01,   // x-size, y-size, offset, (last character-offset : 0x31-0x30)\n0x7C,0xC6,0xCE,0xD6,0xE6,0xC6,0x7C,0x00, // ASCII font data '0' : 0x30\n0x18,0x38,0x18,0x18,0x18,0x18,0x7E,0x00 // ASCII font data  '1' : 0x31\n};\n```\n\n## Configuration file\n\nThe configuration file is created on startup and populated by default values.\nThe file is located at '~/.config/colossus_ltsm/colossus_ltsm.cfg' on Linux systems.\n\n| Setting  | Value |  Default | Note |\n| ------ | ------ | ----- | ----- |\n| scale | int | 8 | Scale of font displayed  |\n| Columns | int |16 | Number of columns of font characters to display|\n\n## Screenshots\n\n![ image ](https://github.com/gavinlyonsrepo/Colossus_LTSM/blob/main/extras/images/screenshot.png)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Font, bitmap conversion and visualization tool for embedded systems",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/gavinlyonsrepo/Colossus_LTSM",
        "Issues": "https://github.com/gavinlyonsrepo/Colossus_LTSM/issues"
    },
    "split_keywords": [
        "fonts",
        " bitmap",
        " converter",
        " embedded",
        " lcd",
        " gui"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16971b96fe5c5e2e9560c023af4e1974557354903221f4e43127ed8cfdefcd43",
                "md5": "67ba08bedb2320b370d31688c31086d4",
                "sha256": "bcc206024a28ca79686a18380d791bd958b45b435f7155802aae7a67ca46c653"
            },
            "downloads": -1,
            "filename": "colossus_ltsm-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "67ba08bedb2320b370d31688c31086d4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 13074,
            "upload_time": "2025-08-23T22:45:02",
            "upload_time_iso_8601": "2025-08-23T22:45:02.423370Z",
            "url": "https://files.pythonhosted.org/packages/16/97/1b96fe5c5e2e9560c023af4e1974557354903221f4e43127ed8cfdefcd43/colossus_ltsm-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf3b8447dbe46b1a712126f8078f7d0f45e0b7727d1885774e7d7de5c50601a8",
                "md5": "30cfc3e3475bbaf8cda4bdc6d05759d0",
                "sha256": "5d01dc9fb6acc40ce6656bba0bcd6d9471d4c82082f5c62feb17ee2aba56081a"
            },
            "downloads": -1,
            "filename": "colossus_ltsm-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "30cfc3e3475bbaf8cda4bdc6d05759d0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12499,
            "upload_time": "2025-08-23T22:45:04",
            "upload_time_iso_8601": "2025-08-23T22:45:04.101825Z",
            "url": "https://files.pythonhosted.org/packages/cf/3b/8447dbe46b1a712126f8078f7d0f45e0b7727d1885774e7d7de5c50601a8/colossus_ltsm-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-23 22:45:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gavinlyonsrepo",
    "github_project": "Colossus_LTSM",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Pillow",
            "specs": []
        }
    ],
    "lcname": "colossus-ltsm"
}
        
Elapsed time: 0.62825s