DB48X: HP48-like RPL implementation for DM42
|
12-16-2024, 02:17 PM
Post: #503
|
|||
|
|||
RE: DB48X: Alternative (TTF) Fonts and size/scale
The DB48X project is ongoing and interesting.
I wanted to try an alternative font or two and this is relatively easy given that the release for the calculator can be obtained from Github (thank you c3d). There are potential copyright issues with some fonts, so I am ignoring that here, because many are free for private use. What I am interested to know is if there is a deterministic way to get the parameters for the ttf2font code (in the build for db48x) that takes a TTF file and creates a set of four ".cc" file as per the Makefile (lines 182 through 189). The three parameters are below (specified in ttf2font in the tools directory). You can see them used in the Makefile after the BASE_FONT is specified. In the release, the BASE_FONT is FogSans-ddd.ttf. -s: this is the fontSize - this is the place to start I think, and then adjust the next two parameters to make the fontSize work for the calculator display. -S: heightPict (this is also described as scaling) -y: yAdjustPixles (this always needs some adjusting from -10 through 0 to +10 based on my experience with the fonts I have used so far. It keeps the bottom of the characters towards the base or the floor of the display space they occupy (e.g. in the softkey and the stack displays). I have to play about with the numbers to get something that eventually "fits" the four calculator fonts: Stack, Editor, Reduced (the softkeys I think) and Help. Luckily the sim[ulator] can be used for preliminary testing, which is quite quick. I would prefer that when I try a new font, I get to a working set of parameters quicker than I do :-) If you have any hints/tips from your experience, please share them. Thank you. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)