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.
[Obsolete("This method will be removed in the next release of the library. Use the CreateFont(fontFace, bold, italic) instead. To underline/strike through a text, use properties with similar names from PdfStringDrawingOptions and PdfTextDrawingOptions.")]
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.
[Obsolete("This method will be removed in the next release of the library. Use the CreateFont(font) instead.")]
public static PdfFont? AddFont(this PdfDocument doc, Font font)
Parameters
doc
PdfDocumentThe document.
font
Font