Xorg Fonts

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 14. X11

- Prev

  xcursor-themes-1.0.7

- Next

  XKeyboard-Config-2.46

- Up
- Home

# Xorg Fonts

## Introduction to Xorg Fonts

The Xorg font packages provide some scalable fonts and supporting packages for Xorg applications. Many people will want to install other TTF or OTF fonts in addition to, or instead of, these. Some are listed at TTF-and-OTF-fonts.

- Download: https://xorg.freedesktop.org/archive/individual/font/

### Xorg Fonts Dependencies

Required
xcursor-themes-1.0.7

## Downloading Xorg Fonts

First, create a list of files to be downloaded. This file will also be used to verify the integrity of the downloads when complete:

    cat > x7font-7-list << "EOF"
    font-util-1.4.1.tar.xz
    encodings-1.1.0.tar.xz
    font-alias-1.0.6.tar.xz
    font-adobe-utopia-type1-1.0.5.tar.xz
    font-bh-ttf-1.0.4.tar.xz
    font-bh-type1-1.0.4.tar.xz
    font-ibm-type1-1.0.4.tar.xz
    font-misc-ethiopic-1.0.5.tar.xz
    font-xfree86-type1-1.0.5.tar.xz
    EOF

To download the needed files using Wget-1.25.0, use the following commands:

    mkdir x7font &&
    cd x7font &&
    grep -v '^#' ../font-7-list | wget -i- -c \
        -B https://xorg.freedesktop.org/archive/individual/font/

## Installation of Xorg Fonts

### Note

When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:

1. Run the entire script as the root user (not recommended).

2. Use the sudo command from the sudo package.

3. Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.

One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.

    as_root()
    {
      if   [ $EUID = 0 ];        then $*
      elif [ -x /usr/bin/sudo ]; then sudo $*
      else                            su -c \\"$*\\"
      fi
    }

    export -f as_root

First, start a subshell that will exit on error:

    bash -e

Install all of the packages by running the following commands:

    for package in $(grep -v '^#' ../x7font-7-list)
    do
      packagedir=${package%.tar.?z*}
      tar -xf $package
      pushd $packagedir
        ./configure $XORG_CONFIG
        make
        as_root make install
      popd
      as_root rm -rf $packagedir
    done

Finally, exit the shell that was started earlier:

    exit

## Contents

Installed Programs: bdftruncate and ucs2any
Installed Libraries: None
Installed Directories: /usr/share/fonts

### Short Descriptions

bdftruncate | generates a truncated BDF font from an ISO 10646-1 encoded BDF font
ucs2any | generates BDF fonts in any encoding from an ISO 10646-1 encoded BDF font

- Prev

  xcursor-themes-1.0.7

- Next

  XKeyboard-Config-2.46

- Up
- Home