Ubuntu – change the Linux console (Ctrl+Alt+F1) font to Ubuntu Mono

consolefontsubuntu-font-familyvirtual-console

Is there a way to set a specific TTF font to be used on the console? (I believe you might have to convert it to a bitmap font?)

If it needs to be converted, what tools can I use to do the conversion? Otherwise, how do I pick Ubuntu Monospace for my console font?

(I already have the Ubuntu Monospace font installed from the beta PPA for it.)

Edit: I already set gnome-terminal to use Ubuntu Mono. Now I'm wanting to set the all-text screens I get when I press Ctrl+Alt+F1 to use the same font.

Best Answer

By joining the font beta testing team, the PPA details given in the sign-up email let you enable a Personal Package Archive that contains:

  • fonts-ubuntu-font-family-console ("Ubuntu Font Family Linux console fonts, sans-serif monospace")

after enabling the PPA you can do:

  1. Ctrl+Alt+F1
  2. sudo apt-get install fonts-ubuntu-font-family-console
  3. setfont /usr/share/consolefonts/UbuntuMono-R-8x16.psf

Note that the font hinting that enables the bitmap generation is still a work-in-progress by Vincent Connare at Dalton Maag. Please give feedback about the look of the 8×16 rendering to bitmaps and how they could be improved at:

PPEM means "pixel per em" and is the number of pixels allocated to the design square when rendering at any size. For the Linux/VGA console this is 16 pixels high. For your question about the tools involved (after the instructing/hinting has been done), the tools are:

  1. otf2bdf
  2. bdf2psf

If you apt-get source ttf-ubuntu-font-family in Ubuntu 11.10 beta, then the code already exists in the debian/console/* source directory (just type make). >This was disabled for the moment because the two small utilities listed above are in Universe, rather than Ubuntu's main component and will need Main Inclusion Reports first.

The bug to follow and add your comments to is:

  • Bug #861334 ("Ship Ubuntu Mono .psf as default console font in Ubuntu 11.10")

Because of the extreme deadlines involved, it is not likely to happen by default until the next release cycle of Ubuntu (after which Vincent will have had a chance to incrementally tweak the hinting work too!).