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

    Show / Hide Table of Contents

    PdfFontFamily Class

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

    Represents a group of font faces having a similar basic design and certain variations in style, weight or stretch.

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

    Constructors

    PdfFontFamily(String)

    Initializes a new instance of the PdfFontFamily class from the specified font family name.

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

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

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

    • C#
    • VB.NET
    public string Name { get; }
    Public ReadOnly Property Name As String
    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.

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

    • 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 family instance.

    Returns
    System.Boolean

    true if the specified System.Object is a PdfFontFamily and is equal to this PdfFontFamily instance; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this PdfFontFamily instance.

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

    A hash code for this PdfFontFamily 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 PdfFontFamily instance.

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

    A System.String that represents this PdfFontFamily 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
    Private fonts example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.