SaveFontToFile

Fonts

Description

Exports the available font program for the currently selected font, including imported TrueType and OpenType/CFF1 programs. A font discovered with FindFonts can be saved when its program is available; this function does not synthesize a missing font program

A static CFF2 source imported through AddOpenTypeFontFromFile exports its normalized CFF1 program. A variable-font template can retain its original program for axis selection, while an explicitly created static variation exports the resolved instance

Syntax

Delphi

Function TPDFlib.SaveFontToFile(Const FileName: WideString): Integer;

ActiveX

Function PDFlib::SaveFontToFile(FileName As String) As Long

DLL

int DLSaveFontToFile(int InstanceID, const wchar_t* FileName);
int DLSaveFontToFileA(int InstanceID, const char* FileName);

Parameters

FileNameThe path and file name of the file that should be created to store the font data in

Return values

0No usable font program is selected, or the font data could not be written
1The selected font program was written to the file successfully