---
name: "al_load_ttf_font_stretch"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_load_ttf_font_stretch"
---

# al\_load\_ttf\_font\_stretch(3)

Allegro 5 API

## NAME

al\_load\_ttf\_font\_stretch - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_ttf.h>
  ALLEGRO_FONT *al_load_ttf_font_stretch(char const *filename, int w, int h,
     int flags)
  ```

## DESCRIPTION

Like [al\_load\_ttf\_font(3)](/al_load_ttf_font/3.md), except it takes separate width and height parameters instead of a single size parameter.

If the height is a positive value, and the width zero or positive, then font will be stretched according to those parameters. The width must not be negative if the height is positive.

As with [al\_load\_ttf\_font(3)](/al_load_ttf_font/3.md), the height may be a negative value to specify the total height in pixels. Then the width must also be a negative value, or zero.

Returns `NULL` if the height is positive while width is negative, or if the height is negative while the width is positive.

## SINCE

5\.0.6, 5.1.0

## SEE ALSO

[al\_load\_ttf\_font(3)](/al_load_ttf_font/3.md), [al\_load\_ttf\_font\_stretch\_f(3)](/al_load_ttf_font_stretch_f/3.md)
