Subject: Re: foreign language characters From: Chris Maden <crism@xxxxxxx> Date: Fri, 14 Nov 1997 11:14:02 -0500 |
[Jim Albright] SDATA is not text. The string > &betdag;&schewa;&resh;&tsere;ℵ&shin;&hiryo;&taw generates a series of SDATA nodes. Jade can recognize some SDATA entities, like the Greek letters, and represent those internally as the appropriate Unicode code points. It will also determine an appropriate display method in RTF; for Greek, it uses the Greek section of Times (or Arial or whatever). This is why your Greek text looks correct. Displaying a character requires not only a font (a set of pictures), but a number (an index into that set). This routine: > (define ($hebrew-trans$) > (make sequence > font-family-name: '"SIL Hebrew Trans" > (process-children))) selects a set of pictures, but does not provide an index. "&betdag;" is not a magic incantation. Until Jade supports the query constructor, you'll need to iterate over any Hebrew text, processing the entities manually: (define ($hebrew-trans$) (make sequence font-family-name: '"SIL Hebrew Trans" (process-text))) (define (process-text #!optional (snl (current-node))) (let p-t-loop ((this-node (node-list-first (children (current-node)))) (other-nodes (node-list-rest (children (current-node))))) (sosofo-append (if (equal? (node-property 'class-name this-node) 'sdata) (case (node-property 'system-data this-node) ;; Hebrew letter schewa (("[replacement text for schewa]") (string #\o)) ;; etc. ) (else (process-node-list this-node))) (if (node-list-empty? other-nodes) (empty-sosofo) (p-t-loop (node-list-first other-nodes) (node-list-rest other-nodes)))))) where (string #\o) creates the character "o" which, when cloaked with the SIL Hebrew font, will look like a schewa. This is a bit of a hack, since it's not *really* a schewa, it just looks like one. You could generate the correct Unicode code point for a schewa, but I don't think that Jade would know what to do with it, and I don't know how to extend Jade's mappings without editing the source code. James? -Chris -- <!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN"> <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN" "<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487 <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek> DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
foreign language characters, Jim_Albright | Thread | Re: foreign language characters, Chris Maden |
Table-part flow object area distinc, G. Ken Holman | Date | Re: foreign language characters, Chris Maden |
Month |