[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.EmbeddedFontCollection

Class EmbeddedFontCollection

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents a collection of EmbeddedFont objects.

Elements in this collection are indexed by EmbeddedFontType (regular, bold, italic, bold italic).

public class EmbeddedFontCollection : IReadOnlyCollection<EmbeddedFont>, IEnumerable<EmbeddedFont>, IEnumerable
Inheritance
object
EmbeddedFontCollection
Implements
System.Collections.Generic.IReadOnlyCollection<T><EmbeddedFont>
System.Collections.Generic.IEnumerable<T><EmbeddedFont>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Count

public int Count { get; }

Property Value

int

Document

Gets the document that contains this font.

public DocumentBase Document { get; }

Property Value

DocumentBase

IsReadOnly

Gets a value indicating whether the containing document is in reading mode.

public bool IsReadOnly { get; }

Property Value

bool

this[EmbeddedFontType]

Gets an embedded font from this collection with a specified type.

public EmbeddedFont this[EmbeddedFontType type] { get; }

Parameters

type EmbeddedFontType

The type of the embedded font.

Property Value

EmbeddedFont

The embedded font with the specified type if found, otherwise null.

Methods

Add(EmbeddedFontType, FontDataType, byte[])

Adds a new embedded font to this collection.

public EmbeddedFont Add(EmbeddedFontType type, FontDataType dataType, byte[] data)

Parameters

type EmbeddedFontType

The type of the embedded font.

dataType FontDataType

The embedded font data type.

data byte[]

The embedded font binary data.

Returns

EmbeddedFont

The newly created embedded font.

Clear()

Clears this collection.

public void Clear()

Contains(EmbeddedFontType)

Checks whether this collection contains an embedded font with the specified type.

public bool Contains(EmbeddedFontType type)

Parameters

type EmbeddedFontType

The type of the embedded font.

Returns

bool

true if the collection contains a font with the specified type, false otherwise.

GetEnumerator()

public IEnumerator<EmbeddedFont> GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T><EmbeddedFont>

Remove(EmbeddedFontType)

Removes the embedded font with a specified type from this collection.

public bool Remove(EmbeddedFontType type)

Parameters

type EmbeddedFontType

The type of the embedded font to remove.

Returns

bool

true if the font with the specified type was removed, false otherwise.

TryGetValue(EmbeddedFontType, out EmbeddedFont)

Tries to get an embedded font with a specified type from this collection.

public bool TryGetValue(EmbeddedFontType type, out EmbeddedFont font)

Parameters

type EmbeddedFontType

The type of the embedded font.

font EmbeddedFont

OUT: if this method returns true, contains the embedded font with the specified type, otherwise null.

Returns

bool

true if a font with the specified type was found, false otherwise.