Importing or converting .ttf font.
Importing or converting .ttf font.
I've noticed all the fonts for the menu end with .pf. I have a few .ttf fonts I would like to bring over to my mister. Is there a tool? I have looked to no avail. I am including the two fonts I would like to add/convert -- maybe someone will sprinkle some faery dust on them . Thanks.
- Attachments
-
- mk2-4_font.zip
- (36.42 KiB) Downloaded 142 times
-
- Top Contributor
- Posts: 531
- Joined: Tue May 26, 2020 5:06 am
- Has thanked: 87 times
- Been thanked: 211 times
Re: Importing or converting .ttf font.
Sliff2000 wrote: ↑Mon Nov 15, 2021 4:28 am I've noticed all the fonts for the menu end with .pf. I have a few .ttf fonts I would like to bring over to my mister. Is there a tool? I have looked to no avail. I am including the two fonts I would like to add/convert -- maybe someone will sprinkle some faery dust on them . Thanks.
TTF fonts are vector font and MiSTer takes bitmap fonts, but I thought I'd try and make a tool to convert them. Keep in mind that not all vector fonts are going to scale down well to 8x8 pix.
First step: Convert TFF to PNG
Load TFF file
Make tweaks (size)
Save PNG file
Second step: Convert PNG to PF
Code: Select all
py png2pf.py -i FONT.PNG -o FONT.PF -p PREVIEW.PNG
Code: Select all
pip install pypng
--> https://github.com/bbond007/MiSTerFontConverter
Python --> https://www.python.org/downloads/
png2pf.py --> https://github.com/MiSTer-devel/Fonts_M ... /png2pf.py
Re: Importing or converting .ttf font.
I am including in my finds an 8x8 pf editor. You can also open multiple instances and copy and paste between them so you can add the system icons ((status bars, wifi, etc..)).
https://www.min.at/prinz/o/software/pixelfont/
https://www.min.at/prinz/o/software/pixelfont/