Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Appendix A - Built-in Script Support / WorldScript I


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:

  1. 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.
  2. 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. The smsfSingByte 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.

  3. If one or more valid script bundles are present, WorldScript I does the following for each script:

    1. It checks for enough memory to load the script.
    2. 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.
    3. It creates a script record and initializes the record with the script's values.
    4. If this is the first universal 1-byte script allocated, WorldScript I loads its script utilities and QuickDraw patches into the system heap.
    5. 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.
    6. 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.
    7. WorldScript I initializes Script Manager data structures that point to this
      script record.

Any initialization errors that occur are reported to the user via the Notification Manager.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996