venusian-surface / fonts
Surface bitmap faces: the GFXFont registry, the classic 5x7, and make:font.
v0.10.1
2026-10-15 16:16 UTC
Requires
- php: ^8.4|^8.5|^8.6
- venusian-surface/contracts: ^0.10.0
- venusian-voyager/console: ^0.10.1
- venusian-voyager/contracts: ^0.10.1
- venusian-voyager/filesystem: ^0.10.1
- venusian-voyager/nuts-and-bolts: ^0.10.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-15 16:18:31 UTC
README
Bitmap faces for Surface. app('fonts')->face('helvb-12') answers a GFXFont;
hand it to a rendering engine's text(). Registry only: drawing lives in
venusian-surface/drawing.
$face = app('fonts')->face(); // the default: classic 5x7 $engine = app('drawing')->renderer('velvet', ['width' => 128, 'height' => 64]); $engine->frame(function ($g) use ($face) { $g->clear(Color::rgb(0, 0, 0)); $g->text('HELLO', 2, 2, Color::rgb(255, 255, 255), $face); $g->translate(2, 14)->scale(2)->text('BIG', 0, 0, Color::rgb(255, 200, 0), $face); });
config/fonts.php: default slug (FONT_FACE), faces map
slug => ['class', 'enabled']. app('fonts')->extend('slug', Face::class)
adds one at run time. php computer make:font Name scaffolds a face under
app/Fonts; --from=FreeSans9pt7b.h imports an Adafruit GFX header.