[]
        
(Showing Draft Content)

GrapeCity.Documents.Text.CffTable

Class CffTable

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

Represents a Compact Font Format (CFF) table.

public class CffTable
Inheritance
object
CffTable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

CharSet

Gets the charset array (GID to SID mapping, or GID to CID for CID-key fonts).

public ushort[] CharSet { get; }

Property Value

ushort[]

CharSpaceToEm

Gets the factor to recalculate character space units to user space units (em).

public float CharSpaceToEm { get; }

Property Value

float

CharStrings

Gets the array of glyph charstrings.

public CffTable.CharString[] CharStrings { get; }

Property Value

CharString[]

CIDGroupIndices

Maps GIDs to indices in the CIDGroups array.

public byte[] CIDGroupIndices { get; }

Property Value

byte[]

DefaultWidthX

If a glyph width equals the DefaultWidthX value it can be omitted from the charstring.

public float DefaultWidthX { get; }

Property Value

float

Encoding

Gets the encoding array (for non-CID fonts). It maps 1-byte code to GID.

public ushort[] Encoding { get; }

Property Value

ushort[]

FontName

Gets the FontName or CIDFontName for CID-keyed fonts.

public string FontName { get; }

Property Value

string

FormatMajorVersion

Gets the format major version (starting at 1).

public int FormatMajorVersion { get; }

Property Value

int

FormatMinorVersion

Gets the format minor version (starting at 0).

public int FormatMinorVersion { get; }

Property Value

int

GlobalSubrs

Gets the array of charstrings with global subrs.

public CffTable.CharString[] GlobalSubrs { get; }

Property Value

CharString[]

GlyphCount

Gets the number of glyphs.

public int GlyphCount { get; }

Property Value

int

IsCIDFont

Gets a value indicating if this is a CID-keyed font.

public bool IsCIDFont { get; }

Property Value

bool

ItalicAngle

Gets the italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).

public float ItalicAngle { get; }

Property Value

float

LocalSubrs

Gets the array of charstrings with local subrs.

public CffTable.CharString[] LocalSubrs { get; }

Property Value

CharString[]

NominalWidthX

The glyph width is computed by adding the CharString width to NominalWidthX value.

public float NominalWidthX { get; }

Property Value

float

UnderlinePosition

Gets the suggested distance of the top of the underline from the baseline (negative values indicate below baseline).

public float UnderlinePosition { get; }

Property Value

float

UnderlineThickness

Gets the suggested value for the underline thickness.

public float UnderlineThickness { get; }

Property Value

float

Methods

GetGid(byte)

Gets the glyph index for specified character code.

public ushort GetGid(byte charCode)

Parameters

charCode byte

Returns

ushort

GetString(int)

Returns a string with the specified SID. Note! Method can return null if string with specified SID not found.

public string GetString(int sid)

Parameters

sid int

Returns

string

TryGetGID(string, out ushort)

Tries to get glyph index (GID) by glyph name.

public bool TryGetGID(string glyphName, out ushort gid)

Parameters

glyphName string
gid ushort

Returns

bool

TryGetGID(ushort, out ushort)

Tries to get glyph index (GID) by glyph name represented by SID.

public bool TryGetGID(ushort sid, out ushort gid)

Parameters

sid ushort
gid ushort

Returns

bool

TryGetSID(ushort, out ushort)

Tries to get glyph name represented by SID by glyph index.

public bool TryGetSID(ushort gid, out ushort sid)

Parameters

gid ushort
sid ushort

Returns

bool