PDA

View Full Version : How to change default font used by lpr?



RupertPupkin
27th January 2010, 08:00 PM
Whenever I use lpr on the command-line to print a text file, it uses DejaVu Sans Mono as the font. Is there a way to change this? I'd like to use Terminus as the font instead. I found that CUPS uses Courier as the default font for text files, so somewhere Courier is being aliased to DejaVu Sans Mono, and I have no idea where. Any ideas?

Dies
27th January 2010, 11:11 PM
Not sure about your actual question, I mean how to get lpr to behave the way you want.

But I do know that you can alias fonts using ~/.fonts.conf

For example


<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>


<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
</prefer>
</alias>

<alias>
<family>sans-serif</family>
<prefer>
<family>DejaVu Sans Mono</family>
</prefer>
</alias>

<alias>
<family>serif</family>
<prefer>
<family>DejaVu Sans Mono</family>
</prefer>
</alias>

</fontconfig>

Should make it so most things use "DejaVu Sans Mono".

More info at http://www.fontconfig.org/fontconfig-user.html

RupertPupkin
29th January 2010, 05:05 AM
Those aliases in ~/.fonts.conf only work for Xft-enabled apps, not for printing from the command-line (I tried it). :(