Name
doc:GetFont -- get handle of font object
Synopsis
font = doc:GetFont(fontname[, encodingname])
Function
doc:GetFont() gets the handle of a requested font object.

See Fonts for a list of valid font names.

See Encodings for a list of valid encoding names.

When doc:GetFont() succeeds, it returns the handle of a font object. Otherwise, it returns Nil and the error handler is called.

Inputs
fontname
a valid font name
encodingname
optional: a valid encoding name (defaults to current encoding)
Results
font
handle to a font
Errors
#HPDF_FAILED_TO_ALLOC_MEM - Memory allocation failed.

#HPDF_INVALID_DOCUMENT - An invalid document handle was set.

#HPDF_INVALID_FONT_NAME - An invalid font name was set.

#HPDF_INVALID_ENCODING_NAME - An invalid encoding name was set.

#HPDF_UNSUPPORTED_FONT_TYPE - An unsupported font type was set.


Show TOC