---
name: "make_trans_font"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/make_trans_font/3alleg4"
---

# make\_trans\_font(3alleg4)

Makes a font use transparency. Allegro game programming library.

## NAME

make\_trans\_font - Makes a font use transparency. Allegro game programming library.

## SYNOPSIS

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

**void make\_trans\_font(FONT \*f);**

## DESCRIPTION

This function converts a font to use transparency for drawing. That is, each glyph in the font will be drawn with draw\_trans\_sprite, so you can use the same blenders as with draw\_trans\_sprite to draw the font. One common use of this is to load a bitmap font with an alpha channel, and therefore get anti-aliased text output by using Allegro's alpha blender. Here's an example how to do that:

```
   FONT *f = load_font("alphafont.tga", NULL, NULL);
   make_trans_font(f);
   set_alpha_blender();
   textprintf_centre_ex(screen, f, 320, 240, -1, -1, "Anti-aliased Font!");
```

## SEE ALSO

**is\_trans\_font**(3alleg4), **set\_alpha\_blender**(3alleg4), **load\_font**(3alleg4), **draw\_trans\_sprite**(3alleg4)
