---
name: "PS_findfont"
section: "3"
platform: "linux"
package: "pslib-dev"
version: "0.4.8-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PS_findfont"
---

# PS\_findfont(3)

Loads a font

## NAME

PS\_findfont — Loads a font

## SYNOPSIS

\#include \<pslib.h\>

int PS\_findfont(PSDoc \*psdoc, const char \*fontname, const char \*encoding, int embed)

## DESCRIPTION

Loads a font for later use. Before text is output with a loaded  font it must be set with [PS\_setfont(3)](/PS_setfont/3.md). This function needs the adobe  font metric file in order to calculate the space used up by the  characters. A font which is loaded within a page will only be available  on that page. Fonts which are to be used in the complete document  has to be loaded before the first call of [PS\_begin\_page(3)](/PS_begin_page/3.md). Calling  [PS\_findfont(3)](/PS_findfont/3.md) between pages will make that font available for all  following pages.

PS\_findfont will try to load the file passed in the parameter  **encoding**. Encoding files are of the same  syntax as those used by **[dvips(1)](/dvips/1.md)**. They contain  a font encoding vector (which is currently not used but must be present)  and a list of extra ligatures to extend the  list of ligatures derived from the afm file.

**encoding** can be NULL or the empty string  if the default encoding (TeXBase1) schall be used.

If the encoding is set to \`builtin' then there will be no  reencoding and the font specific encoding will be used. This is  very useful with symbol fonts.

All files will first be searched in the current directory and  than in the directories set by the parameter \`SearchPath\`.

## RETURN VALUE

Returns the identifier of the font or zero in case of an error.  The identifier is a positiv number.

## SEE ALSO

[PS\_setfont(3)](/PS_setfont/3.md), [PS\_begin\_page(3)](/PS_begin_page/3.md)

## AUTHOR

This manual page was written by Uwe Steinmann \<uwe@steinmann.cx\>.
