Click or drag to resize

PdfiumFPDF_AddStandardFont(IntPtr, FontStockNames, Int32) Method

Creates a standard type font with the specified typeface name and the predefined WinAnsiEncoding encoding.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static IntPtr FPDF_AddStandardFont(
	IntPtr document,
	FontStockNames fontName,
	int encoding
)

Parameters

document  IntPtr
Handle to document. Returned by FPDF_LoadDocument(String, String) and FPDF_CreateNewDocument.
fontName  FontStockNames
A value that specifies the typeface name of the font.
encoding  Int32
A value that specifies an encoding.

Return Value

IntPtr
Handle to newly created font or IntPtr.Zero if any error occurs.
Remarks
See detailed information about standard fonts in FontStockNames.

Possible values of encoding are:

NameValueDescription
WinAnsiEncoding1Windows Code Page 1252, often called the “Windows ANSI” encoding.This is the standard Windows encoding for Latin text in Western writing systems.PDF has a predefined encoding named WinAnsiEncoding that can be used with both Type 1 and TrueType fonts.
MacRomanEncoding2Mac OS standard encoding for Latin text in Western writing systems. PDF has a predefined encoding named MacRomanEncoding that can be used with both Type 1 and TrueType fonts.
MacExpertEncoding3An encoding for use with expert fonts—ones containing the expert character set.PDF has a predefined encoding named MacExpertEncoding.Despite its name, it is not a platform-specific encoding; however, only certain fonts have the appropriate character set for use with this encoding.No such fonts are among the standard 14 predefined fonts.
StandardEncoding4Adobe standard Latin-text encoding. This is the built-in encoding defined in Type 1 Latin-text font programs(but generally not in TrueType font programs). PDF does not have a predefined encoding named StandardEncoding.However, it is useful to describe this encoding, since a font’s built-in encoding can be used as the base encoding from which differences are specified in an encoding dictionary.
AdobeSymbolEncoding5
ZapDingBatsEncoding6
PDFDocEncoding7Encoding for text strings in a PDF document outside the document’s content streams. This is one of two encodings (the other being Unicode) that can be used to represent text strings; see Section, “Text String Type.” PDF does not have a predefined encoding named PDFDocEncoding; it is not customary to use this encoding to show text from fonts.
MSSymbolEncoding8
See Also