PdfFontFace Class
Represents a single variation of a font in terms of PdfFontStyle, PdfFontWeight and PdfFontStretch within the same PdfFontFamily.
public sealed class PdfFontFace : IEquatable<PdfFontFace>
Public NotInheritable Class PdfFontFace
Implements IEquatable(Of PdfFontFace)
- Inheritance:
- System.ObjectPdfFontFace
Implements
Constructors
PdfFontFace(PdfFontFamily, PdfFontStyle, PdfFontWeight, PdfFontStretch)
Initializes a new instance of the PdfFontFace class for the specified Family, Style, Weight and Stretch values.
public PdfFontFace(PdfFontFamily family, PdfFontStyle style, PdfFontWeight weight, PdfFontStretch stretch)
Public Sub New(family As PdfFontFamily, style As PdfFontStyle, weight As PdfFontWeight, stretch As PdfFontStretch)
Parameters
family
- PdfFontFamily
The font family of the font face.
style
- PdfFontStyle
The style of the font face.
weight
- PdfFontWeight
The weight of the font face.
stretch
- PdfFontStretch
The stretch of the font face.
Exceptions
- System.ArgumentNullException
family
cannot be null.
PdfFontFace(String)
Initializes a new instance of the PdfFontFace class from the specified face name.
Parameters
name
- System.String
The face name.
Exceptions
- System.ArgumentNullException
name
cannot be null.
Properties
EmbeddingRights
Gets the font embedding licensing rights of the PdfFontFace.
public PdfFontEmbeddingRights EmbeddingRights { get; }
Public ReadOnly Property EmbeddingRights As PdfFontEmbeddingRights
Property Value
The font embedding licensing rights of the PdfFontFace.
Remarks
important
GemBox.Pdf ignores the EmbeddingRights, so it is the application developer's responsibility to perform the font licensing rights check. If in doubt, contact the font's vendor.
See Also
Family
Gets the font family from which the font face was constructed.
Property Value
The font family from which the font face was constructed.
Stretch
Gets the stretch of the PdfFontFace.
Property Value
The stretch of the PdfFontFace.
Style
Gets the style of the PdfFontFace.
Property Value
The style of the PdfFontFace.
Weight
Gets the weight of the PdfFontFace.
Property Value
The weight of the PdfFontFace.
Methods
Equals(PdfFontFace)
Determines whether the other
PdfFontFace is equal to this PdfFontFace instance.
public bool Equals(PdfFontFace other)
Public Function Equals(other As PdfFontFace) As Boolean
Parameters
other
- PdfFontFace
The other font face to compare with this font face instance.
Returns
- System.Boolean
true if the other
PdfFontFace is equal to this PdfFontFace instance; otherwise, false.
Equals(Object)
Determines whether the specified System.Object is equal to this PdfFontFace 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 face instance.
Returns
- System.Boolean
true if the specified System.Object is a PdfFontFace and is equal to this PdfFontFace instance; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for this PdfFontFace instance.
Returns
- System.Int32
A hash code for this PdfFontFace instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides
ToString()
Returns a System.String that represents this PdfFontFace instance.
Returns
- System.String
A System.String that represents this PdfFontFace 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).