postscript & utf8

2009-04-25 Thread Tomas Hlavaty
Hi Alex, current @lib/ps.l does not deal with utf well enough and comes with a workaround involving bin/lat1. Bellow is a prototype code for displaying utf characters in poscript insired by https://mailman.research.att.com/pipermail/graphviz-interest/2004q2/001407.html # *PsGlyph (in "glyphlist

Re: postscript & utf8

2009-04-26 Thread Tomas Hlavaty
Hi Alex, there was a bug in the previous code: > ((<= 130 C) # utf >(let? L (cdr (assoc C *PsGlyph)) > (prinl ")") > (prin "[") should be: ((<= 130 C) # utf (let? L (cdr (assoc C *PsGlyph))

Re: postscript & utf8

2009-04-26 Thread Randall Dow
Hi Tomas, I would presume that you are beginning to get close to the reason that one often encapsulates strings into an object. You need to know the display length of something to center it, and that means that you want to know the length of the string. Without an encapsulating object, you need to

Re: postscript & utf8

2009-04-26 Thread Alexander Burger
Hi Tomas, wow!! That's what I've been looking for since a long time! I never found a way to use other characters than ISO-8859-1 in "lib/ps.l". I even asked once in "comp.lang.postscript" witout avail. I'll try it now, and build it into "lib/ps.l" when it works. > I am not sure about Japanese

Re: postscript & utf8

2009-04-26 Thread Alexander Burger
Hi Randall, > display length of something to center it, and that means that you want > to know the length of the string. Without an encapsulating object, you > need to recalculate the length often. For most applications, this is While this is often useful, I think it will not help here in this

Re: postscript & utf8

2009-04-26 Thread Alexander Burger
Hi Tomas, now I experimented a little with the glyphs. I would suggest that we use an 'idx' instead of an 'assoc' list, as there might be quite a lot of entries. So I put "glyphlist.txt" in "lib/", and this code in the beginning of "lib/ps.l": # *PsGlyph (in "lib/glyphlist.txt" (use

Re: postscript & utf8

2009-04-26 Thread Alexander Burger
Hi Tomas, > However, centering unicode/non-ascii characters does not work. Any > ideas how to achieve that? This is a serious problem. I cannot see a way to send the string to the PostScript interpreter for the 'stringwidth' calculation. Does anybody have an idea? Cheers, - Alex -- UNSUBSCRIBE

Re: postscript & utf8

2009-04-26 Thread Alexander Burger
On Sun, Apr 26, 2009 at 06:49:49PM +0200, Alexander Burger wrote: > I attach an experimental version of "lib/ps.l". For now, it simply Oops, forgot the attachment :-( # 26apr09abu # (c) Software Lab. Alexander Burger # *PsGlyph (in "lib/glyphlist.txt" (use (L C) (while (setq L (line))

Re: postscript & utf8

2009-04-26 Thread Alexander Burger
On Sun, Apr 26, 2009 at 06:49:49PM +0200, Alexander Burger wrote: > I attach an experimental version of "lib/ps.l". For now, it simply > outputs the glyph name and 'glypshow' for any characters (i.e. also for > ASCII characters). I'll optimize that later. Now, here is a version which generates the

Re: postscript & utf8

2009-04-27 Thread Tomas Hlavaty
Hi Alex, > now I experimented a little with the glyphs. I would suggest that we > use an 'idx' instead of an 'assoc' list, as there might be quite a > lot of entries. yes, seems like a good time for me to learn the new function:-) > But now there are two things I don't understand: Adobe has som

Re: postscript & utf8

2009-05-04 Thread Tomas Hlavaty
Hi Randall & Alex, >> However, centering unicode/non-ascii characters does not work. Any >> ideas how to achieve that? > > I would presume that you are beginning to get close to the reason > that one often encapsulates strings into an object. You need to know > the display length of something to

Re: postscript & utf8

2009-05-05 Thread Alexander Burger
Hi Tomas, > Yes, I found > http://groups.google.com/group/comp.lang.postscript/msg/d0434400d0f37ccf > where /StringWidthRecursive calculates the on the fly. It > encapsulates the string in an array which can contain both strings and > glyphs. Looks a bit too complicated but probably better than

Re: postscript & utf8

2009-05-05 Thread Alexander Burger
On Tue, May 05, 2009 at 09:26:11AM +0200, Alexander Burger wrote: > > http://groups.google.com/group/comp.lang.postscript/msg/d0434400d0f37ccf > > where /StringWidthRecursive calculates the on the fly. It > Looks like a good compromise to me :-) Yep. Implemented it now. I wrote two simple PostScr

Re: postscript & utf8

2009-05-06 Thread Tomas Hlavaty
Hi Alex, > Yep. Implemented it now. I wrote two simple PostScript functions and put > them into a "lib/head.ps" header file. This file is now included from > "lib/ps.l". I just downloaded the testing version and can't find it there? > However, the russian document printing still does not work (n

Re: postscript & utf8

2009-05-06 Thread Alexander Burger
Hi Tomas, > > them into a "lib/head.ps" header file. This file is now included from > ... > I just downloaded the testing version and can't find it there? Hmm, it should be there: $ tar tvfz picoLisp.tgz |grep head.ps -rw-r--r-- abu/abu 641 2009-05-05 15:19 lib/head.ps But I just

Re: postscript & utf8

2009-05-06 Thread Tomas Hlavaty
Hi Alex, >> > them into a "lib/head.ps" header file. This file is now included from >> ... >> I just downloaded the testing version and can't find it there? > > Hmm, it should be there: > >$ tar tvfz picoLisp.tgz |grep head.ps >-rw-r--r-- abu/abu 641 2009-05-05 15:19 lib/head.ps I

Re: postscript & utf8

2009-05-06 Thread Alexander Burger
On Wed, May 06, 2009 at 04:28:56PM +0100, Tomas Hlavaty wrote: > I see the problem, it is not under the picoLisp directory: Aaah, sorry! I made an error when editing the tar script :-( Now it should be correct. Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe