font = doc:GetFont(fontname[, encodingname])
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.
#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.