Commit graph

15 commits

Author SHA1 Message Date
Christophe de Dinechin
96bcd3af32 Attempt to build a QSPI image that is compatible with DM42 program
The idea is to keep the same symbols that the DM42 software uses in
a compatible location, to make it possible to alternatively load the
DM42 and DB48X program.

This seems to work relatively well, but there is a strange behavior
from the DM42 program that complains about being unable to open
the STATE directory of the calculator. It is possible that it is
confused by the presence of .48S files there.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-25 21:18:11 +02:00
Christophe de Dinechin
512e20e503 Move fonts to QSPI
This saves a bit of space for the more interesting parts of DB48X

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-22 16:00:53 +02:00
Christophe de Dinechin
b9f5803fa8 Add build steps to adjust CRC for QSPI file
This is lifted from the WP43 project.
The idea is to be able to move "heavy" and rarely moving data, like fonts, into
the QSPI, so that we have more room for the main program in Flash.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-21 16:39:45 +02:00
Christophe de Dinechin
e835e38781 Add forcecrc32 tool for QSPI checksum adjustment
This is lifted from the WP43 project.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-21 15:14:31 +02:00
Christophe de Dinechin
0211a6e341 Another pass at font fine-tuning
Reset the vertical font positions in the table to what they were initially,
add -y option to ttf2font to perform the adjustment in code.

This preserves the relative positions of lowercase 'a' and 'g'  much better,
and allows the guides in the font editor to show at the right position.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 22:05:30 +02:00
Christophe de Dinechin
f028e690c6 Some font adjustments to make it denser vertically
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 22:05:30 +02:00
Christophe de Dinechin
3f71099129 Add support for scaling ascenders and descenders
It does not work very well, since it moves g relative to c

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 22:05:30 +02:00
Christophe de Dinechin
ce14cf30b3 Fonts are now beyond 128, need to adjust LEB128 generation
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 22:05:30 +02:00
Christophe de Dinechin
49f99b9af9 Fix build failure for missing <cerrno>
Depending on your compiler, <cerrno> (or <errno.h>) may not be implicitly
included by the existing system includes. Add it.

Reported-by: Nigel (UK)
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:33 +02:00
Christophe de Dinechin
7fcb28fcf9 Change the generation of fonts to make them extern
This makes it possible to reference them directly, instead of through an
indirect pointer. Pointer initialization order proves to be a tricky business,
and in the end, we may want to have adjustable fonts, so not much sense making
the pointers read-only anyway.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:32 +02:00
Christophe de Dinechin
ecf939ae05 Build fonts for editor and stack
Add references to the UI fonts from font.h
Also add font::height() to compute the height of the font

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:31 +02:00
Christophe de Dinechin
b28e62929e Fix code generation for sparse fonts
Minor typo in the generated code

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:31 +02:00
Christophe de Dinechin
42683bbe80 Rewrite the ttf2font tool to generate RPL fonts
An RPL font is an RPL object containing font data.
There are two kinds of font: dense and sparse (see code for details).
Internally, there is a third kind, designed to read built-in DM42 fonts.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:31 +02:00
Christophe de Dinechin
6fc4bcfed3 Get the ttf2font from db48x
If we want to import other fonts in the system

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:31 +02:00
Christophe de Dinechin
aebe951167 Cleanup the build system a little
Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
2023-06-19 21:56:30 +02:00