modcasioplot: add original fonts for ASCII on CG-50

This commit is contained in:
Lephenixnoir 2024-01-07 11:41:28 +01:00
parent 2dddd209a0
commit 6547cf5fbc
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
6 changed files with 33 additions and 4 deletions

View File

@ -3,7 +3,7 @@ include ../../py/mkenv.mk
SH_CFLAGS := -DFXCG50
SH_LDFLAGS := -T fxcg50.ld -ljustui-cg -lm -lgint-cg -lc -lgint-cg -lgcc
SH_ASSETS := img_modifier_states.png
SH_ASSETS := img_modifier_states.png font_9.png font_13.png font_19.png
SH_METADATA := fxconv-metadata.txt
SH_CONVFLAGS := --cg

BIN
ports/fxcg50/font_13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
ports/fxcg50/font_19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
ports/fxcg50/font_9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -2,3 +2,30 @@ img_*.png:
type: bopti-image
name_regex: (.*)\.png \1
profile: p4
font_9.png:
name: font_9
type: font
charset: print
grid.size: 9x10
grid.padding: 0
grid.border: 0
proportional: true
font_13.png:
name: font_13
type: font
charset: print
grid.size: 12x17
grid.padding: 0
grid.border: 0
proportional: true
font_19.png:
name: font_19
type: font
charset: print
grid.size: 18x23
grid.padding: 0
grid.border: 0
proportional: true

View File

@ -15,6 +15,10 @@
extern font_t font_4x4;
extern font_t font_4x6;
extern font_t font_5x7;
#else
extern font_t font_9;
extern font_t font_13;
extern font_t font_19;
#endif
/* TODO: casioplot: Call show_screen() when program finishes */
@ -127,9 +131,7 @@ static mp_obj_t draw_string(size_t n, mp_obj_t const *args)
#ifdef FX9860G
font_t const *fonts[3] = { &font_4x4, &font_4x4, &font_5x7 };
#else
/* TODO: casioplot: draw_string(): Add fonts for CG50 */
font_t const *fonts[3] = {
dfont_default(), dfont_default(), dfont_default() };
font_t const *fonts[3] = { &font_9, &font_13, &font_19 };
#endif
color_t color = C_BLACK;