Method AddFont
- Namespace
- BitMiracle.Docotic.Pdf.Gdi
- Assembly
- BitMiracle.Docotic.Pdf.Gdi.dll
AddFont(PdfDocument, string, FontStyle)
Adds the new font with specified properties to the end of the collection of document fonts.
public static PdfFont? AddFont(this PdfDocument doc, string fontFace, FontStyle fontStyle)
Parameters
doc
PdfDocumentThe document.
fontFace
stringThe name of the font face.
fontStyle
FontStyleThe FontStyle of the new font.
Returns
Remarks
If requested font does not have bold or italic version then bold or italic version will be synthesized when needed.
AddFont(PdfDocument, Font)
Adds the new font with the properties of the specified Font to the end of the collection of document fonts.
public static PdfFont? AddFont(this PdfDocument doc, Font font)
Parameters
doc
PdfDocumentThe document.
font
Font