FPDFText_LoadFont function
Returns a font object loaded from a stream of data. The font is loaded into the document. Various font data structures, such as the ToUnicode data, are auto-generated based on the inputs.
document - handle to the document. data - the stream of font data, which will be copied by the font object. size - the size of the font data, in bytes. font_type - FPDF_FONT_TYPE1 or FPDF_FONT_TRUETYPE depending on the font type. cid - a boolean specifying if the font is a CID font or not.
The loaded font can be closed using FPDFFont_Close().
Returns NULL on failure
Implementation
@ffi.Native<
FPDF_FONT Function(
FPDF_DOCUMENT,
ffi.Pointer<ffi.Uint8>,
ffi.Uint32,
ffi.Int,
FPDF_BOOL,
)
>()
external FPDF_FONT FPDFText_LoadFont(
FPDF_DOCUMENT document,
ffi.Pointer<ffi.Uint8> data,
int size,
int font_type,
int cid,
);