Important: The information in this document is obsolete and should not be used for new development.
Initialization Sequence
The startup code for enabling all available 1-byte complex script systems and script utility routines is in WorldScript I. WorldScript I is located in the Extensions folder; its file type is'scri'
and its creator is'univ'
.At startup, WorldScript I does the following:
Any initialization errors that occur are reported to the user via the Notification Manager.
- It checks for a valid machine configuration. WorldScript I works on Macintosh Plus models and later; it requires Script Manager version 2.0 or later and system software version 7.1 or later.
- WorldScript I gets the number of valid 1-byte script bundles in the System file. A valid script bundle consists of a set of international resources (
'itlb'
and'itl5'
required,'itl0',
'itl1',
'itl2',
and'itl4'
optional) and at least one font in the script system's ID range. ThesmsfSingByte bit in the international bundle ('itlb') resource must also be set to indicate that the script is 1-byte.
If no 1-byte script bundles are present, WorldScript I does not load any of its script utilities or QuickDraw patches. It exits without signaling an error.
- If one or more valid script bundles are present, WorldScript I does the following for each script:
- It checks for enough memory to load the script.
- It checks the
smsfUnivExt
bit in the script's international bundle resource. If the flag is set, the script system is a universal script system, and WorldScript I proceeds. If the flag is clear, WorldScript I goes on to the next script.- It creates a script record and initializes the record with the script's values.
- If this is the first universal 1-byte script allocated, WorldScript I loads its script utilities and QuickDraw patches into the system heap.
- WorldScript I allocates the script's dispatch table and sets the table's elements to point to the WorldScript I script utilities and QuickDraw patches or to the original Roman script utilities and QuickDraw calls, as appropriate for the script.
- WorldScript I makes default settings for the script system based on information from the configuration table in the script's encoding/rendering (
'itl5'
) resource. It then looks in the Preferences folder for a script preferences file. If one is found, and if the file contains a configuration resource (type'CNFG'
) for this script system, WorldScript I uses that resource to reinitialize the script record's fields.
If no preferences file is available, WorldScript I keeps the default settings loaded from the encoding/rendering resource.- WorldScript I initializes Script Manager data structures that point to this
script record.