PdfFontFamily Class
Represents a group of font faces having a similar basic design and certain variations in style, weight or stretch.
public sealed class PdfFontFamily : IEquatable<PdfFontFamily>
Public NotInheritable Class PdfFontFamily
Implements IEquatable(Of PdfFontFamily)
- Inheritance:
- System.ObjectPdfFontFamily
Implements
Constructors
PdfFontFamily(String)
Initializes a new instance of the PdfFontFamily class from the specified font family name.
Parameters
name
- System.String
The family name that comprises the new PdfFontFamily.
Exceptions
- System.ArgumentNullException
name
cannot be null.
PdfFontFamily(String, String)
Initializes a new instance of the PdfFontFamily from a string value that represents the location of the font files and the specified font family name.
public PdfFontFamily(string location, string name)
Public Sub New(location As String, name As String)
Parameters
location
- System.String
The location that contains the font files.
name
- System.String
The family name that comprises the new PdfFontFamily.
Remarks
If location
is null or System.String.Empty, System.IO.Directory.GetCurrentDirectory is used.
If location
is relative, it is converted to absolute with System.IO.Path.GetFullPath(System.String) method.
PdfFontFamily(String, String, String)
Initializes a new instance of the PdfFontFamily class from the specified font family name whose font files are embedded as resources in the specified assembly at the specified location.
Read the Remarks of the GetFontFamilies(String, String) method for details about the arguments of this constructor for desktop and web applications.
public PdfFontFamily(string assemblyName, string location, string name)
Public Sub New(assemblyName As String, location As String, name As String)
Parameters
assemblyName
- System.String
The name of the assembly that contains the font files.
location
- System.String
The location of the font files in the assembly.
name
- System.String
The family name that comprises the new PdfFontFamily.
Properties
Name
Gets the name that was used to construct the PdfFontFamily.
Property Value
- System.String
The name that was used to construct the PdfFontFamily.
Methods
Equals(PdfFontFamily)
Determines whether the other
PdfFontFamily is equal to this PdfFontFamily instance.
public bool Equals(PdfFontFamily other)
Public Function Equals(other As PdfFontFamily) As Boolean
Parameters
other
- PdfFontFamily
The other font family to compare with this font family instance.
Returns
- System.Boolean
true if the other
PdfFontFamily is equal to this PdfFontFamily instance; otherwise, false.
Equals(Object)
Determines whether the specified System.Object is equal to this PdfFontFamily instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this font family instance.
Returns
- System.Boolean
true if the specified System.Object is a PdfFontFamily and is equal to this PdfFontFamily instance; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for this PdfFontFamily instance.
Returns
- System.Int32
A hash code for this PdfFontFamily instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides
ToString()
Returns a System.String that represents this PdfFontFamily instance.
Returns
- System.String
A System.String that represents this PdfFontFamily instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).