Problem: 1366926

Title: (Example -Localization & Undo/Redo) Reset language script after redo

Received: Jul 10 1996 5:59PM


In the example of "DemoText", after "redo typing" chiness characters, a funny string is shown on the window instead of the real chiness characters; I think the language script is not set back to chiness script after "redo typing". To reproduce the bug:
- Run "DemoTextPPC_nd".
- Switch to chiness language script (need to install chiness language kits first, then click the pull 
   down menu on second right-top).
- Type few chiness characters:
        select 3rd item "input by pronunciation" on pull down menu in the language dialog.
        type a English character, for ex. b
        double click chiness character on the floating window, and hit the "return" key.
- Undo typing.
- Redo typing, few funny character are shown on the window.

Fix:

Fixed. I created a new routine TTEView::StyleInsert which is used in place of TEStyleInsert. The replacement routine walks through the passed in style runs and sets the keyscript for each one before calling TEStyleInsert with that particular run.

Also, we now check to see if the script has changed when handling characters and set the font accordingly.