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

    Show / Hide Table of Contents

    PdfFontFaceSelectionEventArgs Class

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

    Provides data for the FontSelection event.

    • C#
    • VB.NET
    public sealed class PdfFontFaceSelectionEventArgs : EventArgs
    Public NotInheritable Class PdfFontFaceSelectionEventArgs
        Inherits EventArgs
    Inheritance:
    System.Object
    System.EventArgs
    PdfFontFaceSelectionEventArgs

    Properties

    Character

    Gets or sets the Unicode character that should be outlined with the FontFace or -1 if no character should currently be outlined.

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

    The Unicode character that should be outlined with the FontFace or -1 if no character should currently be outlined.

    Remarks

    If the TextFont doesn't conform to Unicode encoding (the Symbol is true), then the Character does not represent the Unicode character, but the character (glyph) identifier or code specific to the TextFont. In that case, the Character should also be set to the user provided Unicode representation of the Character (glyph) identifier (code) that will be used to select the glyph from the selected FontFace.

    Exceptions
    System.ArgumentOutOfRangeException

    Value must be between 0 and 0x10FFFF (inclusive).

    System.ArgumentException

    The selected FontFace does not contain outlines for the specified character.

    See Also
    PDF Specification ISO 32000-1:2008, section '9.8.2 Font Descriptor Flags'

    Document

    Gets the PdfDocument containing the TextFont for which the FontFace should be selected.

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

    The PdfDocument containing the TextFont for which the FontFace should be selected.

    Remarks

    This property provides the context for implementing different font selection behavior based on the PdfDocument instance.

    FamilyName

    Gets the optional preferred font family name specified in the TextFont's font descriptor.

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

    The optional preferred font family name specified in the TextFont's font descriptor.

    See Also
    PDF Specification ISO 32000-1:2008, section '9.8 Font Descriptors'

    FontFace

    Gets or sets the actual font face that will be used for outlining the Character based on values of other PdfFontFaceSelectionEventArgs members.

    Use any of the font faces returned from the SystemFontFaces, GetFontFaces(String), or GetFontFaces(String, String) collections. Additionally, you can use any of the font faces returned from the StandardFontFaces collection if the SaveOptions is an instance of the PdfSaveOptions.

    • C#
    • VB.NET
    public PdfFontFace FontFace { get; set; }
    Public Property FontFace As PdfFontFace
    Property Value
    PdfFontFace

    The actual font face that will be used for outlining the Character based on values of other PdfFontFaceSelectionEventArgs members.

    Exceptions
    System.ArgumentNullException

    Value is null.

    System.ArgumentException

    The selected PDF standard FontFace can be used only when saving to PDF (the SaveOptions is not an instance of the PdfSaveOptions) or the selected FontFace does not contain outlines for the specified Character.

    IsBoldSimulated

    Gets a value that indicates whether the PdfTextContent, on which the TextFont is applied, simulates a bold weight by applying the Stroke to its Format that has the same color as the Fill and the Width of at least 2% of the font size.

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

    true if the PdfTextContent simulates a bold weight; otherwise, false.

    IsObliqueSimulated

    Gets a value that indicates whether the PdfTextContent, on which the TextFont is applied, simulates an italic style by applying a shearing, or slanting transformation to its TextTransform.

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

    true if the PdfTextContent simulates an italic style; otherwise, false.

    PostScriptName

    Gets the PostScript name of the TextFont.

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

    The PostScript name of the TextFont.

    See Also
    PDF Specification ISO 32000-1:2008, section '9.8 Font Descriptors'

    SaveOptions

    Gets, either explicitly specified or implicitly created, SaveOptions-derived instance representing the context of the current FontSelection event or null if no such context exists (such as in the Print(String, PrintOptions) method).

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

    The SaveOptions-derived instance representing the context of the current FontSelection event or null if no such context exists.

    Remarks

    This property provides the context for implementing different font selection behavior based on the SaveOptions instance.

    Stretch

    Gets the optional font face stretch specified in the TextFont's font descriptor.

    • C#
    • VB.NET
    public PdfFontStretch? Stretch { get; }
    Public ReadOnly Property Stretch As PdfFontStretch?
    Property Value
    System.Nullable<PdfFontStretch>

    The optional font face stretch specified in the TextFont's font descriptor.

    See Also
    PDF Specification ISO 32000-1:2008, section '9.8 Font Descriptors'

    Style

    Gets the optional font face style specified in the Italichttps://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf#page=291 flag of the TextFont's font descriptor flags.

    • C#
    • VB.NET
    public PdfFontStyle? Style { get; }
    Public ReadOnly Property Style As PdfFontStyle?
    Property Value
    System.Nullable<PdfFontStyle>

    The optional font face style specified in the Italic flag of the TextFont's font descriptor flags.

    See Also
    PDF Specification ISO 32000-1:2008, section '9.8 Font Descriptors'
    PDF Specification ISO 32000-1:2008, section '9.8.2 Font Descriptor Flags'

    Symbol

    Gets a value that indicates whether the TextFont conforms to Unicode encoding.

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

    false if the TextFont conforms to Unicode encoding; otherwise, true.

    Remarks

    If the TextFont doesn't conform to Unicode encoding (the Symbol is true), then the Character does not represent the Unicode character, but the character (glyph) identifier or code specific to the TextFont. In that case, the Character should also be set to the user provided Unicode representation of the Character (glyph) identifier (code) that will be used to select the glyph from the selected FontFace.

    See Also
    PDF Specification ISO 32000-1:2008, section '9.8.2 Font Descriptor Flags'

    TextFont

    Gets the PdfTextContent.Format.Text.GetFont(out Double) for which the FontFace should be selected.

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

    The PdfBasicFont for which the FontFace should be selected.

    Weight

    Gets the optional font face weight specified in the TextFont's font descriptor.

    • C#
    • VB.NET
    public PdfFontWeight? Weight { get; }
    Public ReadOnly Property Weight As PdfFontWeight?
    Property Value
    System.Nullable<PdfFontWeight>

    The optional font face weight specified in the TextFont's font descriptor.

    See Also
    PDF Specification ISO 32000-1:2008, section '9.8 Font Descriptors'

    See Also

    FontSelection
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.