Bitmap fonts (PCF/BDF) support with Pango - Desktop Customization & Workflow
Users browsing this thread: 1 Guest(s)
|
|||
Hello nixers,
This is a tutorial thread on how to convert your bitmap fonts, be it PCF, BDF, and others to a format supported by Pango. What we need to do is to put the bitmap inside a container format that Pango/Harfbuzz loader supports, namely SFNT, which is the format of both TTF, OTF, and other fonts. First of all, go to your fontconfig conf directory, usually /etc/fonts/conf.d and make sure that the file filter 70-no-bitmaps.conf is not there. If it is, remove the symbolic link, and replace it with a symbolic link to ../conf.avail/70-yes-bitmaps.conf. If you are so inclined also symlink 10-scale-bitmap-fonts.conf. The next step consists of converting the bitmap font to OTB/SFNT. If you have a PCF you can use the tool pcf2bdf to convert it to BDF, which is more workable. After that there are multiple possibilities, either rely on fontconfig scripting to do the work, with a script similar to this: Code: #!/usr/bin/fontforge Or convert the bitmap font to an outline using this script, but it doesn't give crisp results. Or you can clone the latest version of fonttosfnt, which can be used as follows: Code: fonttosfnt -b -c -g 2 -m 2 -o lime.otb lime.pcf Adjust the options as you see fit but when not adding scalability the font might not work with some programs. After that, you can either install the font locally in $HOME/.local/share/fonts/ or globally in /usr/share/fonts/. Be sure to refresh your fontconfig cache: fc-cache And test using Code: > fc-query lime.otb | grep 'family: ' I hope this help! |
|||
Messages In This Thread |
Bitmap fonts (PCF/BDF) support with Pango - by venam - 24-08-2020, 05:47 AM
RE: Bitmap fonts (PCF/BDF) support with Pango - by movq - 23-09-2020, 10:40 AM
RE: Bitmap fonts (PCF/BDF) support with Pango - by movq - 25-03-2021, 01:15 PM
|