You are not logged in.

#1 2014-06-12 17:29:19

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

How to use console fonts that aren't in /usr/share/kbd/consolefonts?

For a few years now I've been happily using a couple of simple console fonts.  However, I have been curious about trying some monospace fonts strictly on the console.  I've installed a few from the AUR and I installed whatever came in the Infinality bundles.  I can access and use any of those monospace fonts within a terminal in X.  I can't, however, access and use any outside of the /usr/share/kbd/consolefonts directory when at the console.

I have this in my .xinitrc to be able to access custom fonts outside of X's path:

xset +fp /usr/share/fonts/local/  # Prepend a custom font path to Xorg's list of known font paths
xset fp rehash

Do I need to set something like this in my (for example).bashrc file to enable me to get my other monospace fonts at the console?

Edit:  As per JWR's suggestion I've edited this post to un-confuse my original naming faux pas; I did mean using the "console" and not "command line."

Last edited by MoonSwan (2014-06-12 18:43:54)

Offline

#2 2014-06-12 17:50:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to use console fonts that aren't in /usr/share/kbd/consolefonts?

Post your .xinitrc.

Offline

#3 2014-06-12 18:27:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How to use console fonts that aren't in /usr/share/kbd/consolefonts?

.xinitrc has nothing to do with the TTY...

This isn't helped by the question which doesn't make it clear that OP is asking about the console, not the command line...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2014-06-12 21:17:18

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: How to use console fonts that aren't in /usr/share/kbd/consolefonts?

(The following assumes that you are using 'plain' console fonts managed by setfont. If your video hardware has frame buffer support then also have a look at the second part.)

The font formats which `setfont` supports are very different from the formats supported by Xorg font renderers, which means you will have to convert (if at all possible) any fonts you want to use.
A good place to start is the package bdf2psf from the AUR.
If your font isn't in bdf format, you might be able to convert it using FontForge, which you can install from the official repos as the 'fontforge' package (haven't tried this myself, YMMV).

If your video hardware has frame buffer device support in Linux (check if the special file /dev/fb0 exists), then your options are quite a bit better: you could try FbTerm, which can be installed as the 'fbterm' package from the official repos. FbTerm supports fontconfig and freetype2 fonts, same as Qt/Gtk+ based GUI apps.
Note that you need to manually add your user to the 'video' group for fbterm to work (yes, even if you use systemd(!), because systemd does not do this automatically when logging in on the console).

Last edited by ackalker (2014-06-12 21:45:01)

Offline

#5 2014-06-12 21:39:09

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: How to use console fonts that aren't in /usr/share/kbd/consolefonts?

For setting up FbTerm so that it runs automatically on login, please see this topic.

Last edited by ackalker (2014-06-12 21:39:43)

Offline

#6 2014-06-12 22:51:06

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: How to use console fonts that aren't in /usr/share/kbd/consolefonts?

@ackler thanks for the post!  I'm sure my Nvidia card supports framebuffering and that sounds simpler than option one.  I'll definitely give it a try.  smile

Offline

#7 2014-06-12 23:43:48

ackalker
Member
Registered: 2012-11-27
Posts: 201

Re: How to use console fonts that aren't in /usr/share/kbd/consolefonts?

You're welcome :-) Please let us know how it works out.

Offline

Board footer

Powered by FluxBB