Tag: fonts

  • Linux TTY Console Font Too Small?

    I’m not talking about the Terminal (many names for it, all appear as an X-window session in your main screen). I’m talking about the Ctrl-Alt-F1 TTY Console (a text screen, not a window in a graphical screen). You can also access it by booting your computer and interrupting to get to grub or booting into text mode.

    In Linux Mint, you by default have 6 Consoles, Ctrl-Alt-F1 through F6; you press Ctrl-Alt-F7 to get back to your normal graphical screen.

    Many thanks to https://www.linux.com/topic/desktop/how-change-your-linux-console-fonts/ which gave me what I needed to learn.

    What Fonts Do You Have?

    To list the fonts you have, designed for use on your Console:
    ls /usr/share/consolefonts/

    But mostly you want to look at the UTF-8 codeset. Uni3- fonts support most of the Latin and Cyrillic languages, so
    ls /usr/share/consolefonts/Uni3*

    Uni1 (512 glyphs) – most Latin languages, Slavic Cyrillic languages, Hebrew and barely Arabic

    Uni2 (512 glyphs) – most Latin languages, Slavic Cyrillic languages and Greek

    Uni3 (512 glyphs) – most Latin and Cyrillic languages

    Can you convert other fonts for your Console?

    TrueType or OpenType or Postscript fonts are fundamentally different than bitmap fonts which a TTY uses. TTY can not handle fractional pixels, anti-aliasing, hinting, kerning. Converting a scalable font to a TTY size will likely look terrible.

    Just be glad there are a few fonts designed for TTY use, already installed on your Linux system. If you want a special font, use the Terminal in your windowed environment. My favorite font for my text editor, programming editor (Visual Studio Code), Terminal and LibreOffice Spreadsheet, is Fira Code (on Google Fonts).

    If you really want more TTY fonts, search online for TTY fonts. You might be able to find .psf fonts (PC Screen Font format), used by the Linux kernel or console fonts.
    Perhaps zap-light from https://www.zap.org.au/projects/console-fonts-zap/ which goes from 8×16 pixels to 16×32 pixels.

    Specify your TTY Console font

    To set your console font, run
    sudo dpkg-reconfigure console-setup 

    Use the tab key to move from the selection box to the OK button. Use the arrow keys to select your preference.

    For encoding, always pick UTF-8 (unless you know you need different for some special case).

    “Guess optimal character set” is probably best, or in USA or Western Europe select “Latin1 and Latin5 – western Europe and Turkic languages”.

    (Apparently, all modern versions of Linux use framebuffers.)

    Font for the console: Terminus (you can experiment with others if you like).

    Font size: “11×22 (framebuffer only)”, this is the smallest that, on my 1920×1080 14″ notebook, is still easy to read. Once you have this set up, you can easily experiment with different fonts to find what you like best; I’ll say how later.

    It will take a few minutes, let it finish.

    Then press Ctrl-Alt-F1 to go to your Console

    Run this to activate the changes:
    sudo setupcon

    Editing console-setup

    You can also edit /etc/default/console-setup directly.
    sudo nano /etc/default/console-setup

    Here is mine:

    # CONFIGURATION FILE FOR SETUPCON
    
    # Consult the console-setup(5) manual page.
    
    ACTIVE_CONSOLES="/dev/tty[1-6]"
    
    CHARMAP="UTF-8"
    
    CODESET="Lat15"
    FONTFACE="Terminus"
    FONTSIZE="11x22"
    SCREEN_WIDTH="120"
    VIDEOMODE=
    
    # The following is an example how to use a braille font
    # FONT='lat9w-08.psf.gz brl-8x8.psf'

    I find that having lines too long makes them harder to read, so 120 characters is enough. Here is how it looks on my Console (click to expand to full size):

    Linux TTY Console font Uni3-Terminus22x11

    Screen Capture your TTY

    How did I make a screenshot of my Console? There is a command for that, of course. sudo fbgrab /home/YOURNAME/Pictures/your-file-name.png and you can even use one console to take a picture of another console: fbgrab -c N (where N is the number of the Console) lets you “Grab the /dev/ttyN virtual terminal.”

    Making the New Font the Default

    Once you have picked which font you like, e.g.
    setfont /usr/share/consolefonts/Uni3-Terminus24x12.psf.gz
    then to make the current setting the default (with a capital oh)
    setfont -O default

    Once you have the default set, change to the default from whatever font you tried with simply
    setfont

    Here is the Terminus 28×14 font (click to expand to full size)

    Linux TTY Console font Unie-Terminus28.14

    Want to see the original?

    It is hard to read, see for yourself:

  • Sphinx of black quartz, judge my vow

    Sphinx of black quartz, judge my vow

    All from https://en.wikipedia.org/wiki/Pangram

    Examples of pangrams that are shorter than “The quick brown fox jumps over the lazy dog” (which has 35 letters) and use standard written English without abbreviations or proper nouns:
    “Waltz, bad nymph, for quick jigs vex.” (28 letters)
    “Glib jocks quiz nymph to vex dwarf.” (28 letters)
    “Sphinx of black quartz, judge my vow.” (29 letters)
    “How quickly daft jumping zebras vex!” (30 letters)
    “The five boxing wizards jump quickly.” (31 letters)
    “Jackdaws love my big sphinx of quartz.” (31 letters)
    “Pack my box with five dozen liquor jugs.” (32 letters)

    Perfect pangrams

    A perfect pangram contains every letter of the alphabet only once and can be considered an anagram of the alphabet. The only perfect pangrams of the English alphabet that are known use abbreviations or other non-dictionary words, such as “Mr Jock, TV quiz PhD, bags few lynx”, or use words so obscure that the phrase is hard to understand, such as “Cwm fjord glyphs vext bank quiz” (developed by Robert L Birch (ca.1965), & improved for meaning by JRBirch), in which cwm is a loan word from the Welsh language meaning a steep-sided glaciated valley, and vext is an uncommon way to spell vexed. The meaning, clear only to those with an above average vocabulary, is less concisely that the petroglyphs found on the cwm walls of a Nordic fjord, challenged the validity of an archaeological quiz about the banks of that fjord.(–JRB)

    Spanish

    Benjamín pidió una bebida de kiwi y fresa. Noé, sin vergüenza, la más exquisita champaña del menú.
    (“Benjamin ordered a kiwi and strawberry drink. Noah, without shame, the most exquisite champagne on the menu”) uses all diacritics and the foreign letters k and w.

    Scientific Papers

    The scientific paper “Cneoridium dumosum (Nuttall) Hooker F. Collected March 26, 1960, at an Elevation of about 1450 Meters on Cerro Quemazón, 15 Miles South of Bahía de Los Angeles, Baja California, México, Apparently for a Southeastward Range Extension of Some 140 Miles” has a pangrammatic title, seemingly by pure chance. As of January 2022, its English Wikipedia article is the only English Wikipedia article to have a pangrammatic title without having been constructed as a pangram.

    https://en.wikipedia.org/wiki/Pangram

    One more: The five boxing wizards jump quickly.

  • KeyCaps Font for Computer Documentation

    Font Designers: I need a KeyCaps Font!

    I’ve searched the web for a web-licensed keyboard font that has the Windows Flag, Macintosh Clover, all the special keys that are needed for computer software instructional pages. Instructions like “Type your name, press <Tab>, type your email, press <Ctrl>-<Alt>-E (on OS-X, press <Clover>-E), and <Left-Click> OK.”

    Don’t need all the alphabetic, number, punctuation characters, just the special keys, that are legible and look good next to normal sized text, on web pages.

    Prefer it be a separate font, so can use simple commands like <KBD>e</KBD> to display <Enter> or <KBD>c</KBD> to display <Ctrl>, or <KBD>4</KBD> to display the Clover. None of those awkward <#65432;> character codes, that don’t even show in most character maps! (more…)