Team LiB   Previous Section   Next Section
FontSync Control Panel

Syntax

tell app "FontSync"

   properties -- get the control panel's properties

end tell

Dictionary commands

get

This command gets data for an object, optionally as a certain data type (see the as parameter description and the accompanying code example).

as class

You can have the script return the data for, say, the FontSync control panel's default matching options in the specified data type. This code example gets the "on options" (e.g., font names, font types, encoding) for the control panel's font specifications as text values separated by a semi-colon:

(* save the old text item delimiter which is the empty string "" *)

set old_delim to text item delimiters

set text item delimiters to ": " (* separate values with colon and space *)

tell application "FontSync"

   set dmo to default match options

   set on_opt to on options of dmo as text

end tell

set text item delimiters to old_delim

on_opt -- take a look at the on options

(* 

on options values:

"font names: font types: glyphs: encodings: QuickDraw metrics: 

ATSUI metrics: kerning: WorldScript layout: advanced layout: 

print encoding: missing data mismatches"

*)

quit

This command quits the FontSync control panel.

run

This sends a run Apple event to the FontSync control panel, which launches the program if it is not already open.

set

Use this command to set a property, as in the following code example:

tell application "FontSync" 

   set default match options to {class:match options, on options:¬ 

      {font names, font types, glyphs, encodings, QuickDraw¬

         metrics, ATSUI metrics, kerning, WorldScript layout,¬

         missing data mismatches}, off options:{advanced layout,¬ 

         print encoding}}

end tell

Dictionary classes

application

This class represents the FontSync control panel. You can open it with:

tell app "FontSync" to run

Get its properties with:

tell app "Fontsync" to get properties

properties record

This property returns a record type that looks like: {name:"FontSync", frontmost:false, version:"1.0", default match options:{class:match options, on options:{font names, font types, glyphs, encodings, QuickDraw metrics, ATSUI metrics, kerning, WorldScript layout, missing data mismatches}, off options:{advanced layout, print encoding}}}. A record type constitutes one or more name/value pairs that are separated by commas and enclosed in curly braces. Chapter 3, describes the record data type.

name international text (read-only)

This property returns the text "FontSync."

frontmost boolean (read-only)

If the FontSync control panel is the active window on the desktop then this property is true.

version version (read-only)

This property returns the version number as a string, as in "1.0."

default match options match options

All of the options that are checked or unchecked in the FontSync control panel window are represented by this default match options record data type. The default match options looks like this: {class:match options, on options:{font names, font types, glyphs, encodings, QuickDraw metrics, ATSUI metrics, kerning, WorldScript layout, missing data mismatches}, off options:{advanced layout, print encoding}}. See the match options class.

match options

This class represents the FontSync reference matching options that are checked (or unchecked) in the FontSync control panel. The FontSync application's default matching options property returns this object.

on options list of constants (read-only)

This property returns a list of any or none of the following constants:

advanced layout
Kerning
ATSUI metrics
missing data mismatches
encodings
print encoding
font names
QuickDraw metrics
font types
WorldScript layout
glyphs

In other words, if font names is checked in the FontSync control panel, then the on options list includes this constant.

off options list of constants

This property returns a list of any or none of the following constants:

advanced layout
Kerning
ATSUI metrics
missing data mismatches
encodings
print encoding
font names
QuickDraw metrics
font types
WorldScript layout
glyphs

If font names is unchecked in the FontSync control panel, then the off options list includes this constant.

    Team LiB   Previous Section   Next Section