[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Text.FontType0

Class FontType0

Namespace
GrapeCity.Documents.Pdf.Text
Assembly
GcDocs.Pdf.dll

Represents Type0 font in PDF document.

public class FontType0 : Font, IPdfDict
Inheritance
object
FontType0
Implements
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Extension Methods

Properties

DescendantFont

Gets or sets the underlying CIDFont.

public CIDFont DescendantFont { get; }

Property Value

CIDFont

EncodingTable

Gets the CMapTable object that maps character codes to font numbers and CIDs.

public CMapTable EncodingTable { get; }

Property Value

CMapTable

IsEmbedded

Gets a value indicating whether the font is embedded.

public override bool IsEmbedded { get; }

Property Value

bool

Methods

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).

public override Font CreateNativeFont()

Returns

Font

The Font object.

GetFontDescriptor()

Gets an FontDescriptor object that describes the font.

public override FontDescriptor GetFontDescriptor()

Returns

FontDescriptor

The FontDescriptor object.

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.

public override void RemoveEmbeddedData(GcPdfDocument doc)

Parameters

doc GcPdfDocument

The document that owns the font.

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.

public override bool TryGetPdfCode(string unicode, out uint pdfCode, out int pdfCodeLength)

Parameters

unicode string

The character Unicode.

pdfCode uint

OUT: The character PDF code.

pdfCodeLength int

OUT: The length of pdfCode in bytes.

Returns

bool

true if the conversion was successful, false otherwise.

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.

public override bool TryGetUnicode(uint pdfCode, out string unicode)

Parameters

pdfCode uint

The character PDF code.

unicode string

OUT: The character Unicode.

Returns

bool

True if the conversion was successful, false otherwise.