HP Forums
DB48X/50X alternative fonts - softkey "fit"? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: DB48X/50X alternative fonts - softkey "fit"? (/thread-22809.html)



DB48X/50X alternative fonts - softkey "fit"? - n1msr - 12-05-2024 05:22 PM

I am trying to test an alternative font for the DB48X on the simulator for now (WSL Fedora).
I am trying a Courier font just to test that I can do it. I am not suggesting this is right for the DB48X. (The TTF file is CourierPrime.ttf.)

I can get a new .ttf file and get new .cc files generated in the db48x/fonts directory. When I run the simulator the font is there as expected. The "fit" is not good, but I think I can adjust the parameters in the Makefile (sent to ttf2font program that makes the .cc files) to adjust these.

However, I haven't found how to make sure the alterative font fits into the softkey menus. Has anyone tried this? I need to do possibly two things:

1. locate the "bottom" of the characters lower within the softkey outline
2. scale the font so that it fits within the softkey outline

So far I have used the same parameters for ttf2font in the Makefile as in the released build of v0.8.7 of DB48X, which uses FogSans-ddd.ttf as its BASEFONT.

Incidentally, while on the subject of ttf2font, there are two parameters, -s and -S used (upper and lower case 's'). The usage/help message in ttf2font does not distinguish the meanings of the upper and lower case S parameters.
The -s (lower case) is defined as: "-s <size>: Force font size to s pixels\n".

If you need to see the Makefile it is here (Github): https://github.com/c3d/db48x/blob/stable/Makefile

Update: I changed the parameter -y from the release settings in the Makefile that calls ttf2font (for FogSans font) to 0 and this seems to have allowed the Courier font soft menu labels to be readable. "y" adjusts the Y position of the font character.


RE: DB48X/50X alternative fonts - softkey "fit"? - c3d - 12-09-2024 07:47 AM

Glad to see you answered your own question about adjusting the baseline position of the font.

Please be mindful about the right to distribute the font or a version derived from it. FogSans is nice in that respect: I could add the glyphs I needed to it, and redistribute the result. FogSans is distributed under the Apache license. My understanding is that the Microsoft version of Courier is not licensed for redistribution. I understand that you use Courier only for testing, but it's important to point it out before you invest too much time into another font.

The -s option of ttf2font provides a font size. The -S option provides a scaling factor in percent.


RE: DB48X/50X alternative fonts - softkey "fit"? - Eric Rechlin - 12-09-2024 05:26 PM

(12-09-2024 07:47 AM)c3d Wrote:  My understanding is that the Microsoft version of Courier is not licensed for redistribution. I understand that you use Courier only for testing, but it's important to point it out before you invest too much time into another font.

As I understand it, while font files (with their associated hinting and other things) are copyrightable and their names are trademarkable, the actual representations of the glyphs are not. So if you print something with a font, scan it, and trace the vectors to make a new font with a new name, that is completely legal no matter what the font is. So you should be able to take any font you want and convert it to raster/bitmap form for use in DB50X without concern for licensing of the original font. IANAL, but this seems to be broadly agreed at least in the US. I cannot speak for any other countries.


RE: DB48X/50X alternative fonts - softkey "fit"? - n1msr - 12-09-2024 09:22 PM

Thanks both for the reminder. Courier would certainly not be my choice. Its just one I knew and I needed to prove that I could build a release with it, ie another font.

Regards,

Mark