# vahe-vhuk/fontconverter architecture

> Architecture diagram of the GitHub repository vahe-vhuk/fontconverter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vahe-vhuk/fontconverter
- Repository: https://github.com/vahe-vhuk/fontconverter

## Overview

Vhuk’s Font Converter is a PyQt6 desktop application for designing pixel-font character sets and exporting them as C headers for embedded displays. The main workflow is: choose a charset, font, and height; preview and edit glyphs; save or reload a project; then export a header for firmware integration. The sampled code places the GUI, glyph rendering, editing, project persistence, and export in main.py. Some detailed event wiring is omitted, so those relationships are shown only where the README documents them.

Main entry points: [`main.py`](https://github.com/vahe-vhuk/fontconverter/blob/main/main.py) (Main Window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_design["Font Design"]
  node_app["Main Window<br/>[main.py]"]
  node_charset["Charset Controls<br/>[main.py]"]
  node_font["Font Selection<br/>[main.py]"]
  node_glyphs["Glyph Grid<br/>[main.py]"]
  node_pixel["Pixel Editor<br/>[main.py]"]
end

subgraph group_project["Project Files"]
  node_projectfiles["Project Files<br/>[main.py]"]
end

subgraph group_output["C Export"]
  node_header["C Header<br/>[main.py]"]
end

node_user(("Font Designer"))
node_firmware["Display Firmware"]

node_user -->|"uses"| node_app
node_user -->|"enters charset"| node_charset
node_user -->|"selects font"| node_font
node_app -->|"provides controls"| node_charset
node_app -->|"rebuilds grid"| node_glyphs
node_font -->|"renders glyphs"| node_glyphs
node_user -->|"edits glyphs"| node_pixel
node_glyphs -->|"opens editor"| node_pixel
node_pixel -->|"updates pixels"| node_glyphs
node_user -->|"saves or loads"| node_projectfiles
node_app -->|"serializes state"| node_projectfiles
node_user -->|"exports"| node_header
node_app -->|"encodes glyphs"| node_header
node_header -->|"integrates into"| node_firmware

click node_app "https://github.com/vahe-vhuk/fontconverter/blob/main/main.py"
click node_charset "https://github.com/vahe-vhuk/fontconverter/blob/main/main.py"
click node_font "https://github.com/vahe-vhuk/fontconverter/blob/main/main.py"
click node_glyphs "https://github.com/vahe-vhuk/fontconverter/blob/main/main.py"
click node_pixel "https://github.com/vahe-vhuk/fontconverter/blob/main/main.py"
click node_projectfiles "https://github.com/vahe-vhuk/fontconverter/blob/main/main.py"
click node_header "https://github.com/vahe-vhuk/fontconverter/blob/main/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_charset,node_font,node_glyphs,node_pixel toneBlue
class node_projectfiles toneAmber
class node_header toneMint
class node_user,node_firmware toneIndigo
```

## Components

### Font Design

- [Main Window](https://github.com/vahe-vhuk/fontconverter/blob/main/main.py): `main.py`
- [Charset Controls](https://github.com/vahe-vhuk/fontconverter/blob/main/main.py): `main.py`
- [Font Selection](https://github.com/vahe-vhuk/fontconverter/blob/main/main.py): `main.py`
- [Glyph Grid](https://github.com/vahe-vhuk/fontconverter/blob/main/main.py): `main.py`
- [Pixel Editor](https://github.com/vahe-vhuk/fontconverter/blob/main/main.py): `main.py`

### Project Files

- [Project Files](https://github.com/vahe-vhuk/fontconverter/blob/main/main.py): `main.py`

### C Export

- [C Header](https://github.com/vahe-vhuk/fontconverter/blob/main/main.py): `main.py`

### Other components

- **Font Designer**
- **Display Firmware**

## Connections

- Font Designer → Main Window: uses (evidence: `README.md`)
- Font Designer → Charset Controls: enters charset (evidence: `README.md`)
- Font Designer → Font Selection: selects font (evidence: `README.md`)
- Main Window → Charset Controls: provides controls (evidence: `main.py`)
- Main Window → Glyph Grid: rebuilds grid (evidence: `README.md`)
- Font Selection → Glyph Grid: renders glyphs (evidence: `main.py`)
- Font Designer → Pixel Editor: edits glyphs (evidence: `README.md`)
- Glyph Grid → Pixel Editor: opens editor (evidence: `README.md`)
- Pixel Editor → Glyph Grid: updates pixels (evidence: `README.md`)
- Font Designer → Project Files: saves or loads (evidence: `README.md`)
- Main Window → Project Files: serializes state (evidence: `main.py`)
- Font Designer → C Header: exports (evidence: `README.md`)
- Main Window → C Header: encodes glyphs (evidence: `main.py`)
- C Header → Display Firmware: integrates into (evidence: `README.md`)
