AddOpenTypeFontFromFile

Tekst, Lettertypen

Beschrijving

Deze functie is identiek aan AddTrueTypeFontFromFile. Beide functies kunnen een TrueType-, OpenType/TrueType- of OpenType/CFF-font toevoegen vanuit een raw sfnt-, WOFF 1.0- of WOFF2-bestand

Webfontcontainers worden eenmaal in het geheugen uitgepakt en het uitgepakte fontprogramma wordt ingesloten. WOFF2-invoer vereist Windows 10 versie 1703 of later

Momenteel wordt alleen Options = 0 ondersteund

Ondersteunde CFF2-invoer wordt genormaliseerd naar statische CFF1 voor insluiting. Variabele CFF2 gebruikt zijn standaardinstantie; statische CFF2 zonder fvar wordt ook geaccepteerd en rapporteert geen variatieassen. Een statische CFF2-bron exporteert zijn opgeloste CFF1-programma via SaveFontToFile

Syntaxis

Delphi

Function TPDFlib.AddOpenTypeFontFromFile(Const FileName: WideString; Options: Integer): Integer;

ActiveX

Function PDFlib::AddOpenTypeFontFromFile(FileName As String, Options As Long) As Long

DLL

int DLAddOpenTypeFontFromFile(int InstanceID, const wchar_t* FileName, int Options);
int DLAddOpenTypeFontFromFileA(int InstanceID, const char* FileName, int Options);

Parameters

FileNameDe fontbestandsnaam.
OptionsShould be set to 0.

Retourwaarden

0Het lettertype kon niet worden ingesloten
Non-zeroDe ID van het font dat is toegevoegd. Deze ID kan met de functie SelectFont worden gebruikt om het font te selecteren