No edit summary |
|||
Line 15: | Line 15: | ||
2. Convert the font with fonttosfnt | 2. Convert the font with fonttosfnt | ||
$fonttosfnt -b -g 2 -m 1 -o terminusn.otb ../terminus-fonts/ter-*n.pcf.gz | $ fonttosfnt -b -g 2 -m 1 -o terminusn.otb ../terminus-fonts/ter-*n.pcf.gz | ||
$fonttosfnt -b -g 2 -m 1 -o terminusb.otb ../terminus-fonts/ter-*b.pcf.gz | $ fonttosfnt -b -g 2 -m 1 -o terminusb.otb ../terminus-fonts/ter-*b.pcf.gz | ||
3. remove the terminus-fonts package and install the terminusn.otb and terminusb.otb fonts | 3. remove the terminus-fonts package and install the terminusn.otb and terminusb.otb fonts | ||
Line 25: | Line 25: | ||
=== Commands for the ucs-miscfixed-font font === | === Commands for the ucs-miscfixed-font font === | ||
$fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed.otb /usr/share/fonts/ucs-miscfixed/[1-9]*[0-9].bdf | $ fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed.otb /usr/share/fonts/ucs-miscfixed/[1-9]*[0-9].bdf | ||
$fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed-bold.otb /usr/share/fonts/ucs-miscfixed/*B.bdf | $ fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed-bold.otb /usr/share/fonts/ucs-miscfixed/*B.bdf | ||
$fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed-oblique.otb /usr/share/fonts/ucs-miscfixed/*O.bdf | $ fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed-oblique.otb /usr/share/fonts/ucs-miscfixed/*O.bdf |
Revision as of 10:28, 4 November 2019
How to convert Bitmap Font to OpenType Bitmap Font
In Fedora 31, pango is upgraded to 1.44 and switch to use harfbuzz.
In order to continue to use bitmap font with pango, please use the fonttosfnt tool to convert the font.
Take the Terminus font as example
Steps
1. Install fonttosfnt from the below Fedora copr
URL: https://copr.fedorainfracloud.org/coprs/pwu/fonttosfnt/
2. Convert the font with fonttosfnt
$ fonttosfnt -b -g 2 -m 1 -o terminusn.otb ../terminus-fonts/ter-*n.pcf.gz
$ fonttosfnt -b -g 2 -m 1 -o terminusb.otb ../terminus-fonts/ter-*b.pcf.gz
3. remove the terminus-fonts package and install the terminusn.otb and terminusb.otb fonts
4. re-login the desktop and use the "Terminus" font
Commands for the ucs-miscfixed-font font
$ fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed.otb /usr/share/fonts/ucs-miscfixed/[1-9]*[0-9].bdf
$ fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed-bold.otb /usr/share/fonts/ucs-miscfixed/*B.bdf
$ fonttosfnt -b -g 2 -m 1 -o ucs-miscfixed-oblique.otb /usr/share/fonts/ucs-miscfixed/*O.bdf