font = doc:LoadType1Font(afmfilename, pfmfilename)
doc:LoadType1Font()
loads a Type1 font from an external file and registers it in the document object.
When doc:LoadType1Font()
succeeds, it returns the name of a font. Otherwise, it returns Nil
and the error handler is called.
#HPDF_INVALID_DOCUMENT
- An invalid document handle was set.
#HPDF_FAILED_TO_ALLOC_MEM
- Memory allocation failed.
#HPDF_FONT_EXISTS
- The font of the same name has already been registered.
#HPDF_INVALID_AFM_HEADER
- Cannot recognize AFM file.
#HPDF_INVALID_CHAR_MATRICS_DATA
- Cannot recognize AFM file.
#HPDF_INVALID_N_DATA
- Cannot recognize AFM file.
#HPDF_UNSUPPORTED_TYPE1_FONT
- Cannot recognize PFA/PFB file.