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

This appendix describes support for script-specific behavior that is built into Macintosh system software. The code and data described here can work with the resources of many script systems to give the script systems their unique behaviors.

For historical reasons, much of the behavior of the Roman script system is built into Macintosh system software code resources and ROM. The rest of its behavior is expressed in international and keyboard resources that are installed in every version of Macintosh system software. This appendix summarizes that behavior, which represents the default set of Macintosh text-handling features.

WorldScript I is a script extension, consisting of code that implements table-driven measuring and drawing behavior for all 1-byte complex script systems. Using tables in each script system's international resources, WorldScript I properly performs caret placement, hit-testing, justification, text layout, and drawing for all supported scripts. This appendix describes how WorldScript I works and how you can replace some of its individual routines.

WorldScript II is another script extension that implements table-driven measuring and drawing behavior for all 2-byte script systems. Like WorldScript I, WorldScript II uses tables in each script system's international resources to perform text manipulation properly for all supported scripts. This appendix describes how WorldScript II works; note, however, that you cannot replace any of its routines.

Read this appendix for information on Roman character encoding, U.S. Roman keyboard-layout resource features, and the default Roman sorting routines. Read this appendix also if you wish to understand how the WorldScript extensions work, and especially if you intend to replace or modify any of the WorldScript I routines.

Before reading this appendix, read the chapter "Introduction to Text on the Macintosh" in this book. If you intend to modify WorldScript I, read also the discussion on replacing a script system's default routines in the chapter "Script Manager" in this book. Additional information on sorting behavior can be found in the description of the string-manipulation resource in the appendix "International Resources" in this book. Additional information on the keyboard-layout resource can be found in the appendix "Keyboard Resources" in this book.


Appendix Contents
The Roman Script System
The Standard Roman Character Set
Nonprinting Characters
Using Roman Character Codes as Delimiters
Printing Characters
Variations in the Character Set
The U.S. Keyboard-Layout ('KCHR') Resource
Standard Sorting Routines
Diacritical Stripping and Case Conversion
U.S. International Resources and Keyboard Resources
WorldScript I
About WorldScript I
Shared Script Utilities and QuickDraw Patches
Table-Based Script Behavior
Contextual Formatting Routines
Flexible Dispatching Method
Initialization Sequence
How Calls Are Dispatched
Saving User Preferences
Replacing a Script Utility or QuickDraw Patch
Patching Script Utilities
Patching QuickDraw Routines
Issues in Designing a Script Utility or QuickDraw Patch
WorldScript II
About WorldScript II
Shared Script Utilities
Table-Based Script Behavior
Initialization Sequence
How Calls Are Dispatched

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996