PdfSharp-WPF  1.31.7289
PdfSharp.Drawing.XFont Class Reference

Defines an object used to draw text. More...

Public Member Functions

 XFont (string familyName, double emSize)
 Initializes a new instance of the XFont class. More...
 
 XFont (string familyName, double emSize, XFontStyle style)
 Initializes a new instance of the XFont class. More...
 
 XFont (string familyName, double emSize, XFontStyle style, XPdfFontOptions pdfOptions)
 Initializes a new instance of the XFont class. More...
 
double GetHeight ()
 Returns the line spacing, in pixels, of this font. The line spacing is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of the character itself. More...
 
double GetHeight (XGraphics graphics)
 Returns the line spacing, in the current unit of a specified Graphics object, of this font. The line spacing is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of More...
 

Properties

XFontFamily FontFamily [get]
 Gets the XFontFamily object associated with this XFont object. More...
 
string Name [get]
 Gets the face name of this Font object. More...
 
double Size [get]
 Gets the em-size of this Font object measured in the unit of this Font object. More...
 
int Height [get]
 Gets the line spacing of this font. More...
 
XFontStyle Style [get]
 Gets style information for this Font object. More...
 
bool Bold [get]
 Indicates whether this XFont object is bold. More...
 
bool Italic [get]
 Indicates whether this XFont object is italic. More...
 
bool Strikeout [get]
 Indicates whether this XFont object is stroke out. More...
 
bool Underline [get]
 Indicates whether this XFont object is underlined. More...
 
XPdfFontOptions PdfOptions [get]
 Gets the PDF options of the font. More...
 
XFontMetrics Metrics [get]
 Gets the metrics. More...
 

Detailed Description

Defines an object used to draw text.

Constructor & Destructor Documentation

◆ XFont() [1/3]

PdfSharp.Drawing.XFont.XFont ( string  familyName,
double  emSize 
)

Initializes a new instance of the XFont class.

Parameters
familyNameName of the font family.
emSizeThe em size.

◆ XFont() [2/3]

PdfSharp.Drawing.XFont.XFont ( string  familyName,
double  emSize,
XFontStyle  style 
)

Initializes a new instance of the XFont class.

Parameters
familyNameName of the font family.
emSizeThe em size.
styleThe font style.

◆ XFont() [3/3]

PdfSharp.Drawing.XFont.XFont ( string  familyName,
double  emSize,
XFontStyle  style,
XPdfFontOptions  pdfOptions 
)

Initializes a new instance of the XFont class.

Parameters
familyNameName of the font family.
emSizeThe em size.
styleThe font style.
pdfOptionsAdditional PDF options.

Member Function Documentation

◆ GetHeight() [1/2]

double PdfSharp.Drawing.XFont.GetHeight ( )

Returns the line spacing, in pixels, of this font. The line spacing is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of the character itself.

◆ GetHeight() [2/2]

double PdfSharp.Drawing.XFont.GetHeight ( XGraphics  graphics)

Returns the line spacing, in the current unit of a specified Graphics object, of this font. The line spacing is the vertical distance between the base lines of two consecutive lines of text. Thus, the line spacing includes the blank space between lines along with the height of

Property Documentation

◆ Bold

bool PdfSharp.Drawing.XFont.Bold
get

Indicates whether this XFont object is bold.

◆ FontFamily

XFontFamily PdfSharp.Drawing.XFont.FontFamily
get

Gets the XFontFamily object associated with this XFont object.

◆ Height

int PdfSharp.Drawing.XFont.Height
get

Gets the line spacing of this font.

◆ Italic

bool PdfSharp.Drawing.XFont.Italic
get

Indicates whether this XFont object is italic.

◆ Metrics

XFontMetrics PdfSharp.Drawing.XFont.Metrics
get

Gets the metrics.

The metrics.

◆ Name

string PdfSharp.Drawing.XFont.Name
get

Gets the face name of this Font object.

◆ PdfOptions

XPdfFontOptions PdfSharp.Drawing.XFont.PdfOptions
get

Gets the PDF options of the font.

◆ Size

double PdfSharp.Drawing.XFont.Size
get

Gets the em-size of this Font object measured in the unit of this Font object.

◆ Strikeout

bool PdfSharp.Drawing.XFont.Strikeout
get

Indicates whether this XFont object is stroke out.

◆ Style

XFontStyle PdfSharp.Drawing.XFont.Style
get

Gets style information for this Font object.

◆ Underline

bool PdfSharp.Drawing.XFont.Underline
get

Indicates whether this XFont object is underlined.


The documentation for this class was generated from the following file: