---
name: "grab_font_from_bitmap"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/grab_font_from_bitmap"
---

# grab\_font\_from\_bitmap(3alleg)

Grabs a font from a bitmap Allegro game programming library.

## NAME

grab\_font\_from\_bitmap - Grabs a font from a bitmap Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**FONT \*grab\_font\_from\_bitmap(BITMAP \*bmp)**

## DESCRIPTION

This function is the work-horse of load\_bitmap\_font, and can be used to grab a font from a bitmap in memory. You can use this if you want to generate or modify a font at runtime. The bitmap should follow the layout described for load\_bitmap\_font.

## RETURN VALUE

Returns a pointer to the font or NULL on error. Remember that you are responsible for destroying the font when you are finished with it to avoid memory leaks.

## SEE ALSO

[**load\_bitmap\_font**(3alleg)](/load_bitmap_font/3alleg.md)
