GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfFontFace Class

    Namespace:
    GemBox.Pdf.Content
    Assembly:
    GemBox.Pdf.dll

    Represents a single variation of a font in terms of PdfFontStyle, PdfFontWeight and PdfFontStretch within the same PdfFontFamily.

    • C#
    • VB.NET
    public sealed class PdfFontFace : IEquatable<PdfFontFace>
    Public NotInheritable Class PdfFontFace
        Implements IEquatable(Of PdfFontFace)
    Inheritance:
    System.Object
    PdfFontFace
    Implements
    System.IEquatable<PdfFontFace>

    Constructors

    PdfFontFace(PdfFontFamily, PdfFontStyle, PdfFontWeight, PdfFontStretch)

    Initializes a new instance of the PdfFontFace class for the specified Family, Style, Weight and Stretch values.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    public PdfFontFace(string name)
    Public Sub New(name As String)
    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.

    • C#
    • VB.NET
    public PdfFontEmbeddingRights EmbeddingRights { get; }
    Public ReadOnly Property EmbeddingRights As PdfFontEmbeddingRights
    Property Value
    PdfFontEmbeddingRights

    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
    fsType field in the OS/2 and Windows Metrics Table

    Family

    Gets the font family from which the font face was constructed.

    • C#
    • VB.NET
    public PdfFontFamily Family { get; }
    Public ReadOnly Property Family As PdfFontFamily
    Property Value
    PdfFontFamily

    The font family from which the font face was constructed.

    Stretch

    Gets the stretch of the PdfFontFace.

    • C#
    • VB.NET
    public PdfFontStretch Stretch { get; }
    Public ReadOnly Property Stretch As PdfFontStretch
    Property Value
    PdfFontStretch

    The stretch of the PdfFontFace.

    Style

    Gets the style of the PdfFontFace.

    • C#
    • VB.NET
    public PdfFontStyle Style { get; }
    Public ReadOnly Property Style As PdfFontStyle
    Property Value
    PdfFontStyle

    The style of the PdfFontFace.

    Weight

    Gets the weight of the PdfFontFace.

    • C#
    • VB.NET
    public PdfFontWeight Weight { get; }
    Public ReadOnly Property Weight As PdfFontWeight
    Property Value
    PdfFontWeight

    The weight of the PdfFontFace.

    Methods

    Equals(PdfFontFace)

    Determines whether the other PdfFontFace is equal to this PdfFontFace instance.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    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
    System.Object.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this PdfFontFace instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    A hash code for this PdfFontFace instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    System.Object.GetHashCode()

    ToString()

    Returns a System.String that represents this PdfFontFace instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfFontFace instance.

    Overrides
    System.Object.ToString()
    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).

    Implements

    System.IEquatable<T>

    Examples

    Reading text info example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.