Add font selector; load all fonts from fonts/ directory; bump to 0.85
All .ttf files in fonts/ are loaded at startup. The web form now has a font selector dropdown. Glyph-rendering helpers that previously used module-level font globals now accept a _FontData parameter threaded through from generate_svg(). Dockerfile updated to copy all of fonts/ into the image rather than a single hardcoded .ttf path.
This commit is contained in:
@@ -40,7 +40,7 @@ source .venv/bin/activate
|
||||
cd web && python app.py # http://localhost:5000
|
||||
```
|
||||
|
||||
The font must be installed at `/usr/local/share/fonts/г/ГОСТ_тип_А.ttf`.
|
||||
Fonts are loaded at startup from the `fonts/` directory in the repo root.
|
||||
|
||||
### Form parameters
|
||||
|
||||
@@ -84,13 +84,12 @@ Constructs nest: `{m/s^2}` is a fraction with a superscript in the denominator,
|
||||
## Container
|
||||
|
||||
```bash
|
||||
# Copy the font first (not redistributed via the registry)
|
||||
cp /usr/local/share/fonts/г/ГОСТ_тип_А.ttf fonts/
|
||||
|
||||
docker build -t m1730-scale:latest .
|
||||
docker run -p 5000:5000 m1730-scale:latest
|
||||
```
|
||||
|
||||
Fonts are loaded from `fonts/` in the repo root; they are bundled into the image at build time.
|
||||
|
||||
The production image is at `git.baumann.gr/adebaumann/m1730-generator`.
|
||||
|
||||
## Kubernetes
|
||||
|
||||
Reference in New Issue
Block a user