[]
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
public int Count { get; }
Gets the document that contains this font.
public DocumentBase Document { get; }
Gets a value indicating whether the containing document is in reading mode.
public bool IsReadOnly { get; }
Gets an embedded font from this collection with a specified type.
public EmbeddedFont this[EmbeddedFontType type] { get; }
type
EmbeddedFontTypeThe type of the embedded font.
The embedded font with the specified type if found, otherwise null.
Adds a new embedded font to this collection.
public EmbeddedFont Add(EmbeddedFontType type, FontDataType dataType, byte[] data)
type
EmbeddedFontTypeThe type of the embedded font.
dataType
FontDataTypeThe embedded font data type.
data
byte[]The embedded font binary data.
The newly created embedded font.
Clears this collection.
public void Clear()
Checks whether this collection contains an embedded font with the specified type.
public bool Contains(EmbeddedFontType type)
type
EmbeddedFontTypeThe type of the embedded font.
true if the collection contains a font with the specified type, false otherwise.
public IEnumerator<EmbeddedFont> GetEnumerator()
Removes the embedded font with a specified type from this collection.
public bool Remove(EmbeddedFontType type)
type
EmbeddedFontTypeThe type of the embedded font to remove.
true if the font with the specified type was removed, false otherwise.
Tries to get an embedded font with a specified type from this collection.
public bool TryGetValue(EmbeddedFontType type, out EmbeddedFont font)
type
EmbeddedFontTypeThe type of the embedded font.
font
EmbeddedFontOUT: if this method returns true, contains the embedded font with the specified type, otherwise null.
true if a font with the specified type was found, false otherwise.