[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Text.FontSimple

FontSimple Class

The base abstract class representing a simple font in a PDF document.

See the PDF specification for more info about PDF simple fonts.

Implements
Namespace: GrapeCity.Documents.Pdf.Text
Assembly: DS.Documents.Pdf.dll
Syntax
public class FontSimple : Font, IPdfDict
Public Class FontSimple
    Inherits Font
    Implements IPdfDict

Properties

Name Description
Descriptor

Gets the FontDescriptor object describing the font's metrics.

IsEmbedded

Gets a value indicating whether the font is embedded.

Methods

Name Description
CreateNativeFont()

Gets a Font object created from the embedded font data.

Note that this method will return null if the font is not embedded or does not support this operation (e.g. Type3 fonts).

GetFontDescriptor()

Gets an FontDescriptor object that describes the font.

RemoveEmbeddedData(GcPdfDocument)

Removes the embedded font data.

Please note that a PDF may display incorrectly after removing an embedded font's data. Use with caution.

TryGetPdfCode(string, out uint, out int)

Tries to convert a Unicode value to the character's PDF code.

Note that this method can fail if the font does not contain the necessary info for the conversion or does not contain the specified Unicode value.

Note also that this method can be slow as it uses large font tables like /Encoding, /ToUnicode etc., so it is recommended that the returned results are cached by the caller.

TryGetUnicode(uint, out string)

Converts a character's PDF code to its Unicode value.

Note that this method can fail if the font does not contain the necessary info for the conversion.

Note also that this method can be slow as it uses large font tables like /Encoding, /ToUnicode etc., so the returned results better be cached by the caller.

Extension Methods