Introduction
This is a post about several bitmap fonts I modify from M+, Tewi, Lemon, & Siji. At first I modify them because I can’t find any bitmap font that suitable for my personal preferences.
- I want a small bitmap font that can fit in 6x10 bounding box, but placed inside 6x12 bounding box for extra line spacing. I want extra line spacing for readability reason. I know I can add line spacing in URxvt configuration. But I want to use it not only in URxvt.
- Has less curve, to make it looks less pixelated and comfortable for my eyes. But when I find a font that has less curve, it usually too boxy.
- Double storey “a”.
- Slashed zero, I don’t want dotted zero.
- Lowercase “l” at least filling four pixels width.
- Lowercase “i” at least filling three pixels width.
- Reduced pixel to make it less cluttered.
- Two pixel descent part, too make it well aligned with iconic font in statusbar.
- Seven pixel average uppercase & numeric height.
- Five pixel average lowercase height.
- Five pixel average character width.
- Comfortable to read.
- Has same height of cross in “t” and “f”.
- Dot in lowercase “i” and “j” only separated by one empty pixel from the line.
- And other character selections preference.
Every bitmap font I tried can’t fully satisfy me. It must be something lack. Then I tried to install & launch FontForge. But I didn’t know what to do with it. So, I tried to open M+ bitmap font then used it as the base. I kept modifying the characters until it could satisfy me. And it was harder than I thought. I needed a lot of trials of modification & use. If when I was using it I felt something not right, I launched FontForge again and modify something. I kept repeating it until several weeks (I couldn’t fix them in one night, I have limited freetime). Then I decided to settle. It already made me happy. But my curiousity drove me to make some experiment with bitmap font. I modified it to make some variants. I have been enjoying it, time to share the delight. Also to keep the spirit of open source.
Disclaimer
These fonts are designed for my personal preferences, maybe not suitable for you. I’m not a programmer or in any IT profession, so I don’t know if these font could work for programming. I use them for writing article with markdown, shell scripting, editing plain text configuration files, editing XML (I use Openbox by the way), and many other, using Vim inside URxvt. Because I use them in URxvt, it also affects my ncmpcpp music player, ranger file manager, htop task manager, and many other terminal apps. I also use these font for panel, dunst notification, and any font needed by Openbox like titlebar text (but not visible), root menu, client menu, & on screen display. I don’t use them in GTK because they will be mixed with truetype font in some apps like Firefox, LibreOffice, GIMP & Inkscape. It causes me feel dizzy. Also I usually using light theme when using them, because dealing with white canvas in dark theme makes me going blind. Using bitmap font in light theme is blinding me even faster. I care about my healthiness.
Preview
Rissole
- Bounding Box 12x6
- Average Uppercase Height 7px
- Average Lowercase Height 5px
- Average Numeric Height 7px
- Average Character Width 5px
- Ascend 10px
- Descend 2px
- Encoding iso8859 Latin
- Base M+
Canele
- Bounding Box 12x6
- Average Uppercase Height 7px
- Average Lowercase Height 5px
- Average Numeric Height 7px
- Average Character Width 5px
- Ascend 10px
- Descend 2px
- Encoding iso8859 Latin
- Base M+
Castella
- Bounding Box 14x6
- Average Uppercase Height 8px
- Average Lowercase Height 5px
- Average Numeric Height 8px
- Average Character Width 5px
- Ascend 10px
- Descend 2px
- Encoding iso8859 Latin
- Base M+
Mochi
And because the encoding is iso10646, I draw some common powerline characters in area e0a0 to e0a3, e0b0 to e0b3, and e1f1 to e1f4. I only test the powerline characters with zsh agnoster. Hopefully it will works with other plugins too. I personally don’t use powerline because it’s too mainstream and no longer cool enough.
Some characters cannot be drawn normally due to its narrowness. After some while using this font, I realized that 4px width characters font is not a good idea. I never go to optical clinic in my life, not even once. And I never wear eyeglasses (except zero dioptri for fashion purpose). I don’t want to break my healthy eyes, so I abandoned this font.
- Bounding Box 12x5
- Average Uppercase Height 7px
- Average Lowercase Height 5px
- Average Numeric Height 7px
- Average Character Width 4px
- Ascend 10px
- Descend 2px
- Encoding iso10646
- Base Lemon
Tiramisu
- Bounding Box 12x5
- Average Uppercase Height 8px
- Average Lowercase Height 5px
- Average Numeric Height 8px
- Average Character Width 4px
- Ascend 10px
- Descend 2px
- Encoding iso10646
- Base Lemon
Sundae
- Bounding Box 12x6
- Average Uppercase Height 7px
- Average Lowercase Height 5px
- Average Numeric Height 7px
- Average Character Width 5px
- Ascend 10px
- Descend 2px
- Encoding iso10646
- Base Tewi
Pretzel
- Bounding Box 12x6
- Average Uppercase Height 7px
- Average Lowercase Height 5px
- Average Numeric Height 7px
- Average Character Width 5px
- Ascend 10px
- Descend 2px
- Encoding iso10646
- Base Tewi
Waffle
- Bounding Box 10x12
- Average Uppercase Height N/A
- Average Lowercase Height N/A
- Average Numeric Height N/A
- Average Character Width N/A
- Ascend 8px
- Descend 2px
- Encoding iso10646
- Base Siji
I usually copying iconic font using Gucharmap. Launch Gucharmap > Change font to waffle > In the “View” menu check “Show only glyph from this font” > Change the script to Common > Repeatly hit PageDown in glyph list, the glyph is started from U+E000 area. And they are copyable.
How To Use
Clone The Font
Clone the font from my GitHub repository to your font folder in home. I recommend you to put it in ~/.fonts/misc/
|
|
X Logical Font Description
- Load the font using xset
|
|
- Also add it to your autostart to make your life easier, I use Openbox so the autostart is in
~/.config/openbox/autostart file
- On application with X Logical Font Description, write the font name as..
|
|
But because I use different name for every font, we could wildcard it
|
|
- URxvt example (My full URxvt configuration is in this post)
|
|
- URxvt example with fallback and style
|
|
- Other apps those support XLFD : Lemonbar, Fluxbox Style, i3 if Pango disabled, Dzen2, Conky, Spectrbar, dmenu, etc etc
Fontconfig
Not every app support XLFD method, so we need to load these font to Fontconfig. I use Debian, and bitmap font is blocked by default by Fontconfig. Common way to unblock the bitmap font in Debian and derivative is by deleting the /etc/fonts/conf.d/70-no-bitmaps.conf file. But I prefer to reduce touching system file. So, I create a user wide Fontconfig configuration in ~/.fonts.conf file instead.
Allowing every bitmap font to be loaded by Fonconfig has side effects. So, I keep blocking them but creating whitelist for my font.
|
|
Just in case you wonder with my full Fontconfig
|
|
I didn’t delete the /etc/fonts/conf.d/70-no-bitmaps.conf, so actually I don’t need to reject the font in ~/.fonts.conf, I only need to add whitelist. I keep it because this configuration is shared with my Void Linux setup.
Dont forget to refresh the font cache
|
|
Now you can use Rissole font on app that don’t support XLFD, for example..
- Dunst (My full Dunst configuration is in this post)
|
|
- Openbox
|
|
Scaling bitmap font is not a good idea, I recommend you to only use 8 point in size
End
And as always, thanks for reading!