background image
C H A P T E R 8
Text and Ink Input and Display
About Text
When the user writes a line of text on the Newton screen, the Newton system
software performs a series of operations, as follows:
The raw data for the input is captured as ink, which is also known as sketch ink
or raw ink.
Raw ink is stored as a sequence of strokes or stroke data.
If the view in which the ink was drawn is configured for ink text, the recognition
system groups the stroke data into a series of ink words, based on the timing
and spacing of the user's handwriting. A user can insert, delete, and move ink
words in the same way as recognized text. Ink words can be scaled to various
sizes for display and printing. They can also be recognized at a later time, by a
process known as deferred recognition.
If the view in which the ink was drawn supports or is configured for text
recognition, the ink words are processed by the recognition system into
recognized text and displayed in a typeface.
The data describing the handwriting strokes of the ink word are stored as compressed
data in a binary object. This stroke data can be accessed programmatically, using
the stroke bundle methods described in "Recognition" (page 9-1) in Newton
Programmer's Guide
The recognition system and deferred recognition are described in "Recognition"
(page 9-1).
To provide maximum user flexibility for your applications, you
are encouraged to allow ink text in all of your input views.
Written Input Formats
Ink words can be intermixed with recognized text. This data, normally represented
as rich strings, can be used anywhere that you might expect a standard string.
Each ink word is encoded as a single character in a rich string, as described in
"Rich Strings" (page 8-22).
You should use the rich string format to store data in a soup, because of its
compact representation. You can safely use rich strings with all functions, including
the string functions, which are documented in "Utility Functions" (page 26-1).
Another data format, described in "Text and Styles" (page 8-25), pairs text strings
with style data for viewing in text views.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна