Thanks!
The Mojon Twins
89
Posts
1
Topics
411
Followers
247
Following
A member registered Feb 23, 2022 · View creator page →
Creator of
ZX Spectrum - Limpia las habitaciones en el tiempo estipulado de fábrica.
Simulation
NES - Ayuda a Espitene/Cheril a perseguir a Somari y encontrar las seis esmeraldas de Podewwwr
Platformer
ZX-SPECTRUM - ayuda a Phantomas a reunir las 15 monedas de cada nivel de la vieja ciudad Metro y sus alcantarillas.
Adventure
ZX Spectrum - acaba con todos los zombis saltando sobre ellos, pero antes, pulsa los resonadores!
Platformer
ZX-SPECTRUM - Conduce la nave Impossamal por el túnel, recoge 10 cilindros de PODEWWWR y escapa a toda velocidad!
Platformer
AMSTRAD CPC - Guía a Jet Paco o a Jet Puri por los recovecos de la nave y el sistema Rampopinchum.
Platformer
SPECTRUM/AMSTRAD: Reúne 4 trozos del papiro y dáselos a Ramón el Faraón en esta épica videoaventura en Abu Cimbrel
Platformer
ZX SPECTRUM / AMSTRAD CPC: Ayuda a Ramiro a buscar las setas para contentar a su hija el día de su cumpleaños.
Platformer
ZX SPECTRUM - Escapa vivo del centro comercial donde te has refugiado de la horda de no muertos.
Adventure
AMSTRAD CPC - Controla a Lala por los parajes que rodean la casa de Morgana buscando todos sus filtros y fórmulas.
Platformer
Play in browser
Recent community posts
Nuevo juego de Spectrum: "Rumba" - New Spectrum game: "Rumba" comments · Replied to Saberman in Nuevo juego de Spectrum: "Rumba" - New Spectrum game: "Rumba" comments
Arcade Zx Collection - TETRIS comments · Replied to Bubu Marcianito in Arcade Zx Collection - TETRIS comments
Penguin Attack (ZX Spectrum 48K / 128K) comments · Posted in Penguin Attack (ZX Spectrum 48K / 128K) comments
Dungeons of Gomilandia (ZX Spectrum) comments · Posted in Dungeons of Gomilandia (ZX Spectrum) comments
Nevermind, I got it working!
Got the typeface as a bitmap array from https://github.com/susam/pcface/ , converted it to a C array of 256*14 bytes, and then used this to export it to a file:
int main(void) { int chr_width = 8; int chr_height = 14; int chr_baseline = 10; PIXELFONT_U8 pixels [32 * 32]; pixelfont_builder_t* builder = pixelfont_builder_create ( chr_height, chr_baseline, chr_height, NULL ); unsigned char *ptr = PC_FACE_OLDSCHOOL_EGA_8X14_FONT_LIST; for (int c = 0; c < 256; c ++) { // Paint glyph for (int y = 0; y < 14; y ++) { unsigned char bitmap = *ptr ++; for (int x = 0; x < 8; x ++) { if (bitmap & (1 << (7 - x))) { pixels [x + chr_width * y] = 1; } else { pixels [x + chr_width * y] = 0; } } } pixelfont_builder_glyph (builder, c, chr_width, pixels, chr_width, 0, chr_width); } pixelfont_t* pixelfont = pixelfont_builder_font (builder); pixelfont_t* output = (pixelfont_t*) malloc (pixelfont->size_in_bytes); memcpy (output, pixelfont, pixelfont->size_in_bytes); FILE *pf = fopen ("ega14.fnt", "wb"); fwrite (output, sizeof (unsigned char), pixelfont->size_in_bytes, pf); fclose (pf); pixelfont_builder_destroy (builder); }
Thanks for the prompt response! Great news about the UTF8 support. I'm doing conversions myself but this will surely come handy.
About the builder functions, I guess I have to call `pixelfont_builder_glyph` for every glyph I need to add - and pass a 32x32 bytes "bitmap" as `pixels` using 0 for BG and 1 for FG for each pixel in the glyph? top-left aligned?
Thanks again.
Phantomas Tales #4: Severin Sewers 2024 comments · Replied to ZX SPECTRUM STAR in Phantomas Tales #4: Severin Sewers 2024 comments