Font properties

The Font interface supports the following properties:

Bold 
Access  Read/write 
Type  Variant 
Description  Adds or removes bold formatting for the selection, depending on the value of assigned. Allowed values are:
  • true: apply formatting
  • false: remove formatting
  • 3: toggle formatting. That is, remove this formatting style if it is already present in the selection, and add it if it is not present.
Adding bold formatting surrounds the selection with the A element. Read returns true if the selection is currently bold, and false otherwise. 
Usage 
JScript 
vbl=Selection.FX.Bold; 
Selection.FX.Bold=true|false|3;
 
VBScript 
vbl=Selection.FX.Bold 
Selection.FX.Bold=true|false|3
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Bold=true; 
 

Citation 
Access  Read/write 
Type  Boolean 
Description  Adds or removes citation-style formatting for the selection, depending on the value assigned. Allowed values are:
  • true: apply formatting
  • false: remove formatting
  • 3: toggle formatting. That is, remove this formatting style if it is already present in the selection, and add it if it is not present.
Adding citation-style formatting surrounds the selection with the CITATION element. Read returns true if the selection is currently formatted in citation-style, and false otherwise. 
Usage 
JScript 
vbl=Selection.FX.Bold; 
Selection.FX.Bold=true|false|3;
 
VBScript 
vbl=Selection.FX.Bold 
Selection.FX.Bold=true|false|3
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Bold=true; 
 

Color 
Access  Read/write 
Type  String 
Description  Sets or returns the color of the selection. Adding color formatting surrounds the selection with the FONT element. Read returns the empty string if the selection is not surrounded by a FONT element that has the COLOR attribute set. 
Usage 
JScript 
vbl=Selection.FX.Color; 
Selection.FX.Color=strColor;
 
VBScript 
vbl=Selection.FX.Color 
Selection.FX.Color=strColor
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Color="#ff00ff"; 
 

Emphasis 
Access  Read/write 
Type  Boolean 
Description  Adds or removes emphasis-style formatting for the selection, depending on the value assigned. Allowed values are:
  • true: apply formatting
  • false: remove formatting
  • 3: toggle formatting. That is, remove this formatting style if it is already present in the selection, and add it if it is not present.
Adding emphasis-style formatting surrounds the selection with the EM element. Read returns true if the selection is currently formatted in emphasis-style, and false otherwise. 
Usage 
JScript 
vbl=Selection.FX.Emphasis; 
Selection.FX.Emphasis=true|false|3;
 
VBScript 
vbl=Selection.FX.Emphasis 
Selection.FX.Emphasis=true|false|3
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Emphasis=true; 
 

Italic 
Access  Read/write 
Type  Boolean 
Description  Adds or removes italic formatting for the selection, depending on the value assigned. Allowed values are:
  • true: apply formatting
  • false: remove formatting
  • 3: toggle formatting. That is, remove this formatting style if it is already present in the selection, and add it if it is not present.
Adding italic formatting surrounds the selection with the I element. Read returns true if the selection is currently formatted in italic, and false otherwise.. 
Usage 
JScript 
vbl=Selection.FX.Italic; 
Selection.FX.Italic=true|false|3;
 
VBScript 
vbl=Selection.FX.Italic 
Selection.FX.Italic=true|false|3
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Italic=true; 
 

Name 
Access  Read/write 
Type  String 
Description  Sets or returns the name of the font that applies to the selection. Setting the font surrounds the selection with the FONT element. Read returns the empty string unless the selection is surrounded by a FONT element that has the NAME attribute set. 
Usage 
JScript 
vbl=Selection.FX.Name; 
Selection.FX.Name=strFontName;
 
VBScript 
vbl=Selection.FX.Name 
Selection.FX.Name=strFontName
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Name="Courier New"; 
 

Size 
Access  Read/write 
Type  String 
Description  Sets or returns the font size that applies to the selection. Setting the font size surrounds the selection with the FONT element. Read returns the empty string unless the selection is surrounded by a FONT element that has the SIZE attribute set. 
Usage 
JScript 
vbl=Selection.FX.Size; 
Selection.FX.Size=strSize;
 
VBScript 
vbl=Selection.FX.Size 
Selection.FX.Size=strSize
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Size="+2"; 
 

Strong 
Access  Read/write 
Type  Boolean 
Description  Adds or removes strong-style formatting for the selection, depending on the value of assigned. Allowed values are:
  • true: apply formatting
  • false: remove formatting
  • 3: toggle formatting. That is, remove this formatting style if it is already present in the selection, and add it if it is not present.
Adding bold formatting surrounds the selection with the STRONG element. Read returns true if the selection is currently formatted in strong-style, and false otherwise. 
Usage 
JScript 
vbl=Selection.FX.Strong; 
Selection.FX.Strong=true|false|3;
 
VBScript 
vbl=Selection.FX.Strong 
Selection.FX.Strong=true|false|3
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Strong=true; 
 

Teletype 
Access  Read/write 
Type  Boolean 
Description  Adds or removes teletype-style formatting for the selection, depending on the value assigned. Allowed values are:
  • true: apply formatting
  • false: remove formatting
  • 3: toggle formatting. That is, remove this formatting style if it is already present in the selection, and add it if it is not present.
Adding teletype-style formatting surrounds the selection with the TT element. Read returns true if the selection is currently formatted in teletype-style, and false otherwise. 
Usage 
JScript 
vbl=Selection.FX.Teletype; 
Selection.FX.Teletype=true|false|3;
 
VBScript 
vbl=Selection.FX.Teletype 
Selection.FX.Teletype=true|false|3
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Teletype=true; 
 

Underline 
Access  Read/write 
Type  Boolean 
Description  Adds or removes underline formatting for the selection, depending on the value of assigned. Allowed values are:
  • true: apply formatting
  • false: remove formatting
  • 3: toggle formatting. That is, remove this formatting style if it is already present in the selection, and add it if it is not present.
Adding underline formatting surrounds the selection with the U element. Read returns true if the selection is currently underlined, and false otherwise. 
Usage 
JScript 
vbl=Selection.FX.Underline; 
Selection.FX.Underline=true|false|3;
 
VBScript 
vbl=Selection.FX.Underline 
Selection.FX.Underline=true|false|3
 
Example 
// SoftQuad Script Language JSCRIPT: 
Selection.FX.Underline=true; 
 


Right arrow
Next Topic
Left arrow
Previous Topic
Table of contents
Table of Contents

Copyright © SoftQuad Software Inc. 1999