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

    Show / Hide Table of Contents

    FontFile Class

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents a font file either on the disk or in the memory.

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

    Properties

    FamilyName

    Gets the font family name.

    • C#
    • VB.NET
    public string FamilyName { get; }
    Public ReadOnly Property FamilyName As String
    Property Value
    System.String

    The font family name.

    See Also
    GlyphTypeface.FamilyNames property

    Italic

    Gets a value indicating whether the characters in a font are truly (Italic) or artificially (Oblique) slanted.

    Default value is false.

    • C#
    • VB.NET
    public bool Italic { get; }
    Public ReadOnly Property Italic As Boolean
    Property Value
    System.Boolean

    true if the characters in a font are slanted; otherwise, false.

    See Also
    FontStyles class

    Stretch

    Gets the integer value between 1 and 9 that represents OpenType font widths.

    Default value is 5.

    • C#
    • VB.NET
    public int Stretch { get; }
    Public ReadOnly Property Stretch As Integer
    Property Value
    System.Int32

    The integer value between 1 and 9 that represents OpenType font widths.

    See Also
    FontStretches class

    Weight

    Gets the integer value between 1 and 999 that represents OpenType font weight.

    Default value is 400. Bold value is 700.

    • C#
    • VB.NET
    public int Weight { get; }
    Public ReadOnly Property Weight As Integer
    Property Value
    System.Int32

    The integer value between 1 and 999 that represents OpenType font weight.

    See Also
    FontWeights class

    Methods

    ContainsCharacter(Int32)

    Determines whether the font file contains outlines for the specified Unicode character.

    • C#
    • VB.NET
    public bool ContainsCharacter(int character)
    Public Function ContainsCharacter(character As Integer) As Boolean
    Parameters
    character
    System.Int32

    The Unicode character.

    Returns
    System.Boolean

    true if the font file contains outlines for the specified Unicode character; otherwise, false.

    Equals(FontFile)

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

    • C#
    • VB.NET
    public bool Equals(FontFile other)
    Public Function Equals(other As FontFile) As Boolean
    Parameters
    other
    FontFile

    The other font file to compare with this font file instance.

    Returns
    System.Boolean

    true if the other FontFile is equal to this FontFile instance; otherwise, false.

    Equals(Object)

    Determines whether the specified System.Object is equal to this FontFile 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 file instance.

    Returns
    System.Boolean

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

    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this FontFile instance.

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

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

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

    A System.String that represents this FontFile 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>

    See Also

    GlyphTypeface class
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.