TextFont
TextFont
Section titled “TextFont”app.textFonts[index]
Description
Section titled “Description”Information about a font in the document, found in a CharacterAttributes object.
Properties
Section titled “Properties”TextFont.family
Section titled “TextFont.family”app.textFonts[index].family
Description
Section titled “Description”The font’s family name.
String; read-only.
TextFont.name
Section titled “TextFont.name”app.textFonts[index].name
Description
Section titled “Description”The font’s full name.
String; read-only.
TextFont.parent
Section titled “TextFont.parent”app.textFonts[index].parent
Description
Section titled “Description”The object’s container.
Object; read-only.
TextFont.style
Section titled “TextFont.style”app.textFonts[index].style
Description
Section titled “Description”The font’s style name.
String; read-only.
TextFont.typename
Section titled “TextFont.typename”app.textFonts[index].typename
Description
Section titled “Description”The class name of the object.
String; read-only.
Example
Section titled “Example”Setting the font of text
Section titled “Setting the font of text”// Sets the font of all the text in the document to the first fontif ( app.documents.length > 0 ) {
// Iterate through all text art and apply font 0 for ( i = 0; i< app.activeDocument.textFrames.length; i++) { textArtRange = app.activeDocument.textFrames[i].textRange; textArtRange.characterAttributes.textFont = app.textFonts[0]; }}