FontInfoCollection

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Iterable

public class FontInfoCollection implements Iterable

Represents a collection of fonts used in a document.

To learn more, visit the Working with Fonts documentation article.

Items are FontInfo objects.

You do not create instances of this class directly. Use the DocumentBase.getFontInfos() property to access the collection of fonts defined in the document.

Methods

Method Description
contains(String name) Determines whether the collection contains a font with the given name.
equals(Object arg0)
get(int index) Gets a font at the specified index.
get(String name) Provides access to the collection items.
getClass()
getCount() Gets the number of elements contained in the collection.
getEmbedSystemFonts() Specifies whether or not to embed System fonts into the document.
getEmbedTrueTypeFonts() Specifies whether or not to embed TrueType fonts in a document when it is saved.
getSaveSubsetFonts() Specifies whether or not to save a subset of the embedded TrueType fonts with the document.
hashCode()
iterator() Returns an iterator object that can be used to iterate over all items in the collection.
notify()
notifyAll()
setEmbedSystemFonts(boolean value) Specifies whether or not to embed System fonts into the document.
setEmbedTrueTypeFonts(boolean value) Specifies whether or not to embed TrueType fonts in a document when it is saved.
setSaveSubsetFonts(boolean value) Specifies whether or not to save a subset of the embedded TrueType fonts with the document.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

contains(String name)

public boolean contains(String name)

Determines whether the collection contains a font with the given name.

Parameters:

Parameter Type Description
name java.lang.String Case-insensitive name of the font to locate.

Returns: boolean - True if the item is found in the collection; otherwise, false.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

Parameter Type Description
arg0 java.lang.Object

Returns: boolean

get(int index)

public FontInfo get(int index)

Gets a font at the specified index.

Parameters:

Parameter Type Description
index int Zero-based index of the font.

Returns: FontInfo - A font at the specified index.

get(String name)

public FontInfo get(String name)

Provides access to the collection items. Gets a font with the specified name.

Parameters:

Parameter Type Description
name java.lang.String Case-insensitive name of the font to locate.

Returns: FontInfo - The corresponding FontInfo value.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCount()

public int getCount()

Gets the number of elements contained in the collection.

Returns: int - The number of elements contained in the collection.

getEmbedSystemFonts()

public boolean getEmbedSystemFonts()

Specifies whether or not to embed System fonts into the document. Default value for this property is false.

This option works only when getEmbedTrueTypeFonts() / setEmbedTrueTypeFonts(boolean) option is set to true.

Setting this property to True is useful if the user is on an East Asian system and wants to create a document that is readable by others who do not have fonts for that language on their system. For example, a user on a Japanese system could choose to embed the fonts in a document so that the Japanese document would be readable on all systems.

This option works for DOC, DOCX and RTF formats only.

Returns: boolean - The corresponding boolean value.

getEmbedTrueTypeFonts()

public boolean getEmbedTrueTypeFonts()

Specifies whether or not to embed TrueType fonts in a document when it is saved. Default value for this property is false.

Embedding TrueType fonts allows others to view the document with the same fonts that were used to create it, but may substantially increase the document size.

This option works for DOC, DOCX and RTF formats only.

Returns: boolean - The corresponding boolean value.

getSaveSubsetFonts()

public boolean getSaveSubsetFonts()

Specifies whether or not to save a subset of the embedded TrueType fonts with the document. Default value for this property is false.

This option works only when getEmbedTrueTypeFonts() / setEmbedTrueTypeFonts(boolean) property is set to true.

This option works for DOC, DOCX and RTF formats only.

Returns: boolean - The corresponding boolean value.

hashCode()

public native int hashCode()

Returns: int

iterator()

public Iterator iterator()

Returns an iterator object that can be used to iterate over all items in the collection.

Returns: java.util.Iterator

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setEmbedSystemFonts(boolean value)

public void setEmbedSystemFonts(boolean value)

Specifies whether or not to embed System fonts into the document. Default value for this property is false.

This option works only when getEmbedTrueTypeFonts() / setEmbedTrueTypeFonts(boolean) option is set to true.

Setting this property to True is useful if the user is on an East Asian system and wants to create a document that is readable by others who do not have fonts for that language on their system. For example, a user on a Japanese system could choose to embed the fonts in a document so that the Japanese document would be readable on all systems.

This option works for DOC, DOCX and RTF formats only.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setEmbedTrueTypeFonts(boolean value)

public void setEmbedTrueTypeFonts(boolean value)

Specifies whether or not to embed TrueType fonts in a document when it is saved. Default value for this property is false.

Embedding TrueType fonts allows others to view the document with the same fonts that were used to create it, but may substantially increase the document size.

This option works for DOC, DOCX and RTF formats only.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

setSaveSubsetFonts(boolean value)

public void setSaveSubsetFonts(boolean value)

Specifies whether or not to save a subset of the embedded TrueType fonts with the document. Default value for this property is false.

This option works only when getEmbedTrueTypeFonts() / setEmbedTrueTypeFonts(boolean) property is set to true.

This option works for DOC, DOCX and RTF formats only.

Parameters:

Parameter Type Description
value boolean The corresponding boolean value.

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

Parameter Type Description
arg0 long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

Parameter Type Description
arg0 long
arg1 int