ttf2svg command not found

In this troubleshooting guide we learn how to fix ttf2svg command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

ttf2svg: command not found

or when using sudo you get the following error message

sudo: ttf2svg: command not found

Solutions to ttf2svg: command not found

How To Fix ttf2svg: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ttf2svg is provided by libbatik-java package.

libbatik-java is:

Batik is a toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation.

Batik provides several modules to be used in applications:

  • A SVG generator module, usable to export graphics into the SVG format.
  • A SVG processor and SVG Viewing component for integrating SVG viewing.
  • A module to convert SVG to various formats, such as raster images (JPEG, PNG or Tiff) and PS, PDF.

fop is necessary for PDF output of rasterizer.

rhino is necessary for using the SVG browser, squiggle.

For detailed information, go to http://xml.apache.org/batik/

To fix this problem, we can install more using the command below.

sudo apt-get -y install libbatik-java

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install libbatik-java.

sudo apt -y install libbatik-java

Or if you have aptitude installed you can use the following command.

sudo aptitude install libbatik-java

Summary

In this tutorial we learn how to fix ttf2svg command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.