# HaruDoc::loadTTF

(PECL haru >= 0.0.1)

HaruDoc::loadTTF — Load TTF font file

### Description

HaruDoc::loadTTF ( string `$fontfile` [, bool `$embed` = `FALSE` ] ) : string

Loads the given TTF file and (optionally) embed its data into the document.

### Parameters

`fontfile`

  The TTF file to load.

`embed`

  When set to `TRUE`, the glyph data of the font is embedded into the PDF file, otherwise only the matrix data is included.

### Return Values

Returns the name of the loaded font on success.

### Errors/Exceptions

Throws a HaruException on error.

### See Also

- HaruDoc::loadTTC() - Load the font with the specified index from TTC file
- HaruDoc::loadType1() - Load Type1 font