Click or drag to resize
Pdf Library for .NET

PdfFontStyle Enumeration

Selection style for a system font resolved by family name. Describes which weight / slant variant of the family to load (Regular, Bold, Italic, or Bold+Italic).

Namespace: SelectPdf.Universal
Assembly: SelectPdf.HtmlToPdf.Universal (in SelectPdf.HtmlToPdf.Universal.dll) Version: 26.4
Syntax
[FlagsAttribute]
public enum PdfFontStyle
Members
Member nameValueDescription
Regular0Regular (upright) weight.
Bold1Bold weight.
Italic2Italic (or oblique) slant.
Remarks
Only values that select a distinct font file on the host system are included. Text decorations such as underline / strikeout are applied at draw time via IsUnderline and IsStrikeout — they are properties of the glyph run, not of the loaded font, so they don't belong here.
Example
PdfSystemFont font = new PdfSystemFont("Arial", 12f,
    PdfFontStyle.Bold | PdfFontStyle.Italic);
doc.Fonts.Add(font);
See Also