79 lines
2.5 KiB
Markdown
79 lines
2.5 KiB
Markdown
[](https://git.klemek.fr/klemek/glsl-glyphs/actions?workflow=lint.yml)
|
|
|
|
# GLSL Glyphs Generator
|
|
|
|
> Generate GLSL ready 8x8 glyph maps and usable functions
|
|
|
|
## Usage
|
|
|
|
```txt
|
|
usage: glsl-glyphs [-h] -i INPUT_FILE [-n NAME] -o OUTPUT_FILE [-g NAMES_FILE] [-s SETS_FILE] [-f | --functions | --no-functions]
|
|
[-v | --verbose | --no-verbose] [-q | --quiet | --no-quiet]
|
|
|
|
options:
|
|
-h, --help show this help message and exit
|
|
-i, --input INPUT_FILE
|
|
png 8x8 glyph map
|
|
-n, --name NAME target derived name for GLSL constants and functions (default: glyph)
|
|
-o, --output OUTPUT_FILE
|
|
output glsl file
|
|
-g, --glyph-names NAMES_FILE
|
|
glyphs names, one line each
|
|
-s, --sets SETS_FILE defined sets in CSV: index,length,name
|
|
-f, --functions, --no-functions
|
|
add GLSL functions to output
|
|
-v, --verbose, --no-verbose
|
|
more verbose logging
|
|
-q, --quiet, --no-quiet
|
|
disable logging
|
|
```
|
|
|
|
## More info about included resources
|
|
|
|
### IBM PC CP437
|
|
|
|
See [Why is there a "small house" in IBM's Code page 437?](https://blog.glyphdrawing.club/why-is-there-a-small-house-in-ibm-s-code-page-437/) for more info on IBM PC CP437.
|
|
|
|
### Crystalwarrior
|
|
|
|
See [1 bit by Crystalwarrior](https://alex-noir.itch.io/1-bit-by-cw)
|
|
|
|
### Pmlomb
|
|
|
|
See [8x8 1 bit pixel set](https://opengameart.org/content/8x8-1-bit-pixel-set)
|
|
|
|
## Development
|
|
|
|
### Makefile
|
|
|
|
```txt
|
|
Usage: make [target1] [target2] ...
|
|
|
|
Commands/Targets:
|
|
help show this message
|
|
install install project
|
|
update update project dependencies
|
|
run run project
|
|
sample-all generate all samples
|
|
sample-% generate sample (cp437/cw/pmlomb)
|
|
format format project
|
|
lint lint project
|
|
build build project
|
|
uv-sync uv sync
|
|
uv-upgrade uv sync upgrade
|
|
uv-run uv run (project)
|
|
uv-run-sample-% uv run (project) sample/(xxx)
|
|
ruff ruff check
|
|
ruff-fix ruff check (and fix)
|
|
ruff-format ruff format
|
|
ruff-format-check ruff format (check only)
|
|
ty ty check
|
|
release-% release major/minor/patch
|
|
```
|
|
|
|
### TODO
|
|
|
|
* [ ] Initial implementation
|
|
* [ ] Custom height glyph map
|
|
* [ ] Custom width glyph map
|