linux - Is it possible to use TrueType fonts in framebuffer?

08
2013-08
  • Kirill

    Is it possible to use TrueType monosize fonts in console with framebuffer driver (vesafb)? I'm using Ubuntu.

  • Answers
  • TechZilla

    Yes, it can be done with this type of setup. None of these require the installation of an X Server.

    1. FrameBuffer support

    2. Fontconfig + FreeType2 + TTF Fonts

    3. Framebuffer terminal which supports Fontconfig

    fbcon does not support this type of setup. I have used fbterm, It looks great and is very fast.

  • quack quixote

    It should be. OK, well, it all depends on what you're doing.

    TTFs aren't supported in the kernel, and the kernel's console fonts are all you get at boot time. With the in-kernel console framebuffer, fbcon, the only fonts available are those included when the kernel was compiled. I'd be suprised if the kernel includes code to render TTFs. If you want TTFs during boot, you're probably out of luck.

    But if you can wait until after boot, you can load an X server and make use of it's font renderers, which support TTFs last time I checked. If you're working on an application, this is probably where you'll need the fonts anyway, so you should be good.

    Here's kernel documentation on vesafb (and links to fbcon and the generic kernel framebuffer). I haven't found any documentation on the kernel's console fonts, but there should be some in there somewhere.

    This ancient Framebuffer HOWTO is all I could find that specifically talks about fonts, and it doesn't say much -- this is specifically talking about the kernel's console fonts:

    To get the capability to change fonts, you need kbd-0.99 [...] you will be able to load international fonts [...] into your console device


  • Related Question

    Installing Microsoft ttf fonts on Ubuntu
  • therefromhere

    I want to install a Microsoft Vista TTF font (lets say Consolas), on Ubuntu 9.04 (Jaunty Jackalope).

    How do I go about doing that?


  • Related Answers
  • Diago

    This article explains how to install the Microsoft fonts on Ubuntu step by step. It's part of the Universe repository.

    This article explain how to install the Vista fonts which includes Consolas on Ubuntu. You need to extract the fonts from the Microsoft Powerpoint Viewer.

  • therefromhere

    If you've got a Windows machine handy (IANAL but I think you need a Vista licence in order to legally use the Consolas font), copy the file somewhere convenient.

    Then in a terminal:

    sudo cp *.ttf /usr/local/share/fonts
    cd /usr/local/share/fonts
    sudo chown root:root *.ttf
    sudo fc-cache
    
  • Kirill

    Check out this script.

    winetricks is a quick and dirty script to download and install various redistributable runtime libraries...