Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!uw-june!chou From: chou@cs.washington.edu (Pai Chou) Newsgroups: comp.sys.mac.programmer Subject: Re: FindScriptRun ?!$@! Message-ID: <13668@june.cs.washington.edu> Date: 8 Nov 90 00:44:08 GMT References: <27387FBD.12689@orion.oac.uci.edu> Reply-To: chou@june.cs.washington.edu (Pai Chou) Distribution: usa Organization: University of Washington, Computer Science, Seattle Lines: 33 In article <27387FBD.12689@orion.oac.uci.edu> ggiergiel@vmsa.oac.uci.edu writes: >Version 2.0 of Script Manager "documents" >a new script interface routine called FindScriptRun. >The thing is supposed to take a pointer to a block of >character codes and to return the first contiguous >script block within that text. >The obvious question is: How does it determine which >script a character code belongs to? >I see no way this can be done. After all, characters do >not belong to any particular script, fonts do. > >Could one of the authors of that documentation >(Mark Davis, Sue Bartalo or John Harvey) be >kind enough to clarify that point for us, please. > >J. Giergiel I am not one of the authors, but I guess it is possible if the text is associated with some TextEdit record. If you have an old style TextEdit then you can figure out whether the char is English or non-English by scanning for the MSB. If you have a new style TextEdit then you can figure out from the font ID of the character. If this assumption is correct then the FindScriptRun routine can look at the hText fields of active textedit records, compare pointers, and look at the TextEdit record for font info. I'm just guessing. I'd be interested in finding out how this works too. Pai Chou