SaveFontToFile

Fonts

Description

Exports whatever font program is available for the currently selected font, imported TrueType and OpenType/CFF1 programs included. A font located with FindFonts can be saved as long as its program is present; the function will not synthesise a font program that is missing

A static CFF2 source imported via AddOpenTypeFontFromFile exports its normalised CFF1 program. A variable-font template may keep its original program for axis selection, whereas a static variation created explicitly 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