Class PdfFont
- Namespace
- EvoPdf
- Assembly
- evohtmltopdf.dll
This class represents a font that can be added to a PDF document and used by the text elements
[ClassInterface(ClassInterfaceType.AutoDual)]
public class PdfFont
- Inheritance
-
PdfFont
- Inherited Members
Properties
FontBaseFamily
Gets the predefined family name of this PDF font.
public StdFontBaseFamily FontBaseFamily { get; }
Property Value
FontFamily
Gets the name of the font family of this PDF font.
public string FontFamily { get; }
Property Value
Height
Gets the height of this PDF font.
public float Height { get; }
Property Value
IsStrikeout
A flag to indicate if the font is strikeout.
public bool IsStrikeout { get; set; }
Property Value
IsUnderline
A flag to indicate if the font is underline.
public bool IsUnderline { get; set; }
Property Value
Size
Gets or sets size in points of this PDF font.
public float Size { get; set; }
Property Value
Methods
Clone(Document)
Creates a clone of this font in the specified document.
public PdfFont Clone(Document document)
Parameters
document
DocumentThe cloned font document.
Returns
- PdfFont
The font object clone.
GetCharWidth(char)
Gets the width of the specified character in points.
public float GetCharWidth(char c)
Parameters
c
charThe character.
Returns
- float
The character width in points.
GetSystemFont()
Converts this font to a corresponding system font.
public Font GetSystemFont()
Returns
- Font
A system font corresponding to this font object.
GetTextSize(string)
Gets the size of the specified string in points.
public SizeF GetTextSize(string text)
Parameters
text
stringThe measured string.
Returns
- SizeF
The size of the string in points.
GetTextWidth(string)
Get the width in points of the specified string when rendered in PDF using this font.
public float GetTextWidth(string text)
Parameters
text
stringThe measured string.
Returns
- float
The width of the string in points.