[ILUG] [TOTD] fontconfig and fixed size fonts

P at draigBrady.com P at draigBrady.com
Tue Mar 16 17:25:55 GMT 2004


OK I hate antialiased fonts for monospaced apps. I.E. text consoles,
text editors, ... IMHO having a fixed size bitmap font is optimum
because since the text doesn't need to be an arbitrary size you
can just use the human generated representation without any computer
generated fuzzies (which granted do help a lot for scalable text).
Plus antialiased text is slower (which I tested in gnome terminal
by running dd if=/dev/zero | od -Ax -tx1z -v
while switching fonts dynamically in "edit current profile").

So to that end, how does one know which font to use?

First just monospace fonts won't do as this can be scaled
to any size, and hence are antialiased.

$ fc-list ":spacing=mono:scalable=true" family
Luxi Mono
Bitstream Vera Sans Mono
Courier 10 Pitch
Nimbus Mono L
Courier

You need to specify scalable=false (or equivalently antialias=false)

$ fc-list ":spacing=mono:scalable=false" family pixelsize
console8x8       8
console8x16      16
Fixed            14,15,16,20,24
Gothi            12,14,16,18
LucidaTypewriter 8,10,12,14,18,19,24
Marumoji         14
MiscFixed        6,7,8,9,10,12,13,14,15,18,20

Right. My favourite from the above is MiscFixed 10.
So where to set this in the system?

1. To set gnome wide terminal font, goto:
    Start -> Preferences -> Font -> Terminal Font
2. xchat:
    Settings -> Preferences -> Interface -> Text Box -> Font
3. gvim:
    In ~/.gvimrc do the following:
    if has("gui_gtk2")
        set guifont=MiscFixed\ 10
    else
        set 
guifont=-misc-fixed-medium-r-normal--10-100-75-75-c-60-iso8859-1
    endif

-- 
Pádraig Brady - http://www.pixelbeat.org



More information about the ILUG mailing list