---
name: "ftbench"
section: "1"
platform: "linux"
package: "freetype2-demos"
version: "2.15.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ftbench"
---

# ftbench(1)

benchmark some common FreeType paths

## NAME

ftbench - benchmark some common FreeType paths

## SYNOPSIS

**ftbench** \[*options*\] *fontname*

## DESCRIPTION

The **ftbench** tool measures performance of some common FreeType operations.

This program is part of the FreeType demos package.

## OPTIONS

- **-a** *axis1***,***axis2***,***...*

  For Multiple Master, GX, or OpenType variation fonts, specify design coordinates for each axis at start-up. Ignored for all other font formats.

- **-b** *tests*

  Perform chosen tests:

  | | |
  | --- | --- |
  | **a** | load glyphs (FT\_Load\_Glyph) |
  | **b** | load advance widths (FT\_Get\_Advances) |
  | **c** | render glyphs (FT\_Render\_Glyph) |
  | **d** | load glyphs (FT\_Get\_Glyph) |
  | **e** | get glyph indices (FT\_Get\_Char\_Index) |
  | **f** | iterate CMap (FT\_Get\_{First,Next}\_Char) |
  | **g** | open a new face (FT\_New\_Face or FT\_New\_Memory\_Face) |
  | **h** | embolden glyphs (FT\_GlyphSlot\_Embolden) |
  | **i** | stroke glyphs (FT\_Glyph\_Stroke) |
  | **j** | get glyph bboxes (FT\_Outline\_Get\_BBox) |
  | **k** | get glyph cboxes (FT\_Glyph\_Get\_CBox) |
  | **l** | open a new face and load glyphs |

-

  (default is **abcdefghijkl**, this is, all tests).

-

  The number of used glyphs per test (within a single iteration) is given by option **-i**.

- **-C**

  Compare with cached version if available.

- **-c** *N*

  Use at most *N* iterations for each test (0 means time limited).

- **-e** *E*

  Use charmap with index *E* instead of the default unicode.

- **-f** *L*

  Use **hexadecimal** (not decimal) number *L* as load flags (see the \`**FT\_LOAD\_XXX**' macros in the FreeType reference).

- **-H** *name*

  Using CFF hinting engine *name*. Available versions are depending on compilation options of FreeType; call **ftbench** without an argument to get the actual list.

- **-I** *ver*

  Using TT interpreter version *ver*. Available versions are depending on compilation options of FreeType; call **ftbench** without an argument to get the actual list.

- **-i** *I-J*

  Forward or reverse range of glyph indices to use (default is from 0 to the number of glyphs minus one).

- **-m** *M*

  Set maximum cache size to *M* KiByte (default is 1024).

- **-p**

  Preload font file in memory (this is, testing **FT\_New\_Memory\_Face** instead of **FT\_New\_Face**).

- **-r** *R*

  Set render mode to *R*:

  | | |
  | --- | --- |
  | **0** | normal |
  | **1** | light |
  | **2** | mono |
  | **3** | horizontal LCD |
  | **4** | vertical LCD |

-

  (default is 0). This corresponds to the values of the \`**FT\_RENDER\_MODE\_XXX**' flags.

- **-s** *S*

  Use *S* ppem as face size (default is 10ppem). If set to zero, don't call **FT\_Set\_Pixel\_Sizes**. Use value 0 with option \`**-f 1**' or something similar to load the glyphs unscaled, otherwise errors will show up.

- **-t** *T*

  Use at most *T* seconds per test (default is 2).

- **-v**

  Show version.
