---
name: "xcb_open_font"
section: "3"
platform: "linux"
package: "libxcb"
version: "1.17.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/xcb_open_font"
---

# xcb\_open\_font(3)

opens a font

## NAME

xcb\_open\_font - opens a font

## SYNOPSIS

**#include \<xcb/xproto.h\>**

### Request function

xcb\_void\_cookie\_t **xcb\_open\_font**(xcb\_connection\_t \**conn*, xcb\_font\_t *fid*, uint16\_t *name\_len*, const char \**name*);\

## REQUEST ARGUMENTS

- *conn*

  The XCB connection to X11.

- *fid*

  The ID with which you will refer to the font, created by *xcb\_generate\_id*.

- *name\_len*

  Length (in bytes) of *name*.

- *name*

  A pattern describing an X core font.

## DESCRIPTION

Opens any X core font matching the given *name* (for example "-misc-fixed-\*").

Note that X core fonts are deprecated (but still supported) in favor of client-side rendering using Xft.

## RETURN VALUE

Returns an *xcb\_void\_cookie\_t*. Errors (if any) have to be handled in the event loop.

If you want to handle errors directly with *xcb\_request\_check* instead, use *xcb\_open\_font\_checked*. See **[xcb-requests(3)](/xcb-requests/3.md)** for details.

## ERRORS

- *xcb\_name\_error\_t*

  No font matches the given *name*.

## SEE ALSO

[**xcb-requests**(3)](/xcb-requests/3.md), **xcb\_generate\_id**(3)

## AUTHOR

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
