From marc.battyani at fractalconcept.com Tue Nov 1 12:15:23 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 1 Nov 2005 13:15:23 +0100 Subject: [cl-typesetting-devel] cl-typesetting Unicode support :) References: <091c01c4375f$dce93bb0$0a02a8c0@marcxp> <04de01c495e9$e06f5dd0$0a02a8c0@marcxp> Message-ID: <059201c5dedd$efd0bba0$0a02a8c0@marcxp> I've commited the latest modifications to the cl-typesetting repository. The most interesting point is the Unicode support. (see the attached pdf file) For now it's Lispworks only. There is only the unicode-string-type macro to change for other implementations, so please send me the customized versions of this macro. cl-typesetting rev 105: -Unicode support :) (LispWorks only for now) -A fix for very long multi-pages tables [Dmitri Ivanov] -Added an example directory -Added a business card example -SBCL compatibility fixes [Far?] -Changed the full-example to work without graphs -Various other fixes The full repository is here: http://www.fractalconcept.com:8000/public/open-source/ (It's a subversion 1.0 repository.) The cl-pdf part: http://www.fractalconcept.com:8000/public/open-source/cl-pdf/ The cl-typesetting part: http://www.fractalconcept.com:8000/public/open-source/cl-typesetting/ The mod_lisp part: http://www.fractalconcept.com:8000/public/open-source/mod_lisp/ There are also tarballs for cl-pdf and cl-typesetting: http://www.fractalconcept.com/download/cl-pdf-current.tgz http://www.fractalconcept.com/download/cl-typesetting-current.tgz BTW the (somewhat outdated) home pages for these projects are here: http://www.fractalconcept.com/asp/html/cl-pdf.html http://www.fractalconcept.com/asp/html/cl-typesetting.html http://www.fractalconcept.com/asp/html/mod_lisp.html Marc From marc.battyani at fractalconcept.com Tue Nov 1 12:24:02 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 1 Nov 2005 13:24:02 +0100 Subject: [cl-typesetting-devel] cl-typesetting Unicode support :) References: <091c01c4375f$dce93bb0$0a02a8c0@marcxp><04de01c495e9$e06f5dd0$0a02a8c0@marcxp> <059201c5dedd$efd0bba0$0a02a8c0@marcxp> Message-ID: <05a701c5dedf$251ba850$0a02a8c0@marcxp> > The most interesting point is the Unicode support. (see the attached pdf > file) Oops, too big for the mailing list. Here it is: http://www.fractalconcept.com/fcweb/download/hello-u.pdf Marc From fahree at gmail.com Tue Nov 1 21:23:28 2005 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Tue, 1 Nov 2005 16:23:28 -0500 Subject: [cl-typesetting-devel] cl-typesetting Unicode support :) In-Reply-To: <059201c5dedd$efd0bba0$0a02a8c0@marcxp> References: <091c01c4375f$dce93bb0$0a02a8c0@marcxp> <04de01c495e9$e06f5dd0$0a02a8c0@marcxp> <059201c5dedd$efd0bba0$0a02a8c0@marcxp> Message-ID: <653bea160511011323m4b8eb641y@mail.gmail.com> Congratulations for the latest cl-typesetting! The newest SBCL (thanks for including support!) caught errors in (the version you use of) iterate regarding misuse of (delete ...) which has side-effects is doesn't preserve its second argument. (delete entry index) should be (setf index (delete entry index)) twice, and (delete nil temps) should probably be (remove nil temps). I don't know where is the "upstream" of iterate, but if they don't have this fix, they should get it, too. Patch attached. Happily these errors don't seem to affect the behaviour of cl-pdf. Note that the example9 of cl-pdf is very slow. Is it purposeful that the picture be only one fourth of the page? > The most interesting point is the Unicode support. (see the attached pdf > file) > For now it's Lispworks only. There is only the unicode-string-type macro to > change for other implementations, so please send me the customized versions > of this macro. 'string should work great for SBCL with SB-UNICODE. However, I couldn't get the hello-u example to work, because it complained there was no font file TimesNewRomanPSMT. The instructions in your cl-pdf/unicode-readme.txt don't work as is. In particular, I can create a .afm and a .t1a from a ttf file thanks to ttf2pt1 but no .ufm file. I'll muck around some more... [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] Can anyone squash this butterfly in Tokyo? I'm sick with its flapping wings changing the outcome of my life. -------------- next part -------------- A non-text attachment was scrubbed... Name: iterate.diff Type: text/x-patch Size: 1025 bytes Desc: not available URL: From marc.battyani at fractalconcept.com Tue Nov 1 21:52:24 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 1 Nov 2005 22:52:24 +0100 Subject: [cl-typesetting-devel] cl-typesetting Unicode support :) References: <091c01c4375f$dce93bb0$0a02a8c0@marcxp><04de01c495e9$e06f5dd0$0a02a8c0@marcxp><059201c5dedd$efd0bba0$0a02a8c0@marcxp> <653bea160511011323m4b8eb641y@mail.gmail.com> Message-ID: <00e901c5df2e$8b3baa00$0a02a8c0@marcxp> "Far?" wrote: >Congratulations for the latest cl-typesetting! Thanks! >The newest SBCL (thanks for including support!) caught errors in (the >version you use of) iterate regarding misuse of (delete ...) which has >side-effects is doesn't preserve its second argument. (delete entry >index) should be (setf index (delete entry index)) twice, and (delete >nil temps) should probably be (remove nil temps). I don't know where >is the "upstream" of iterate, but if they don't have this fix, they >should get it, too. Patch attached. Happily these errors don't seem to >affect the behaviour of cl-pdf. OK. Have you sent it to the iterate mailing list ? >Note that the example9 of cl-pdf is very slow. Is it purposeful that >the picture be only one fourth of the page? I don't know. It's just an example. I just checked it was OK. > The most interesting point is the Unicode support. (see the attached pdf > file) > For now it's Lispworks only. There is only the unicode-string-type macro to > change for other implementations, so please send me the customized versions > of this macro. >'string should work great for SBCL with SB-UNICODE. However, I >couldn't get the hello-u example to work, because it complained there >was no font file TimesNewRomanPSMT. The instructions in your >cl-pdf/unicode-readme.txt don't work as is. In particular, I can >create a .afm and a .t1a from a ttf file thanks to ttf2pt1 but no .ufm >file. I'll muck around some more... Don't bother, in fact this version don't generate a .ufm file. :( The Windows executable I've put on my site does though. I'm modifying ttf2pt1 to generate a merged afm/ufm file, it will be cleaner. Marc From fahree at gmail.com Tue Nov 1 22:15:46 2005 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Tue, 1 Nov 2005 17:15:46 -0500 Subject: [cl-typesetting-devel] cl-typesetting Unicode support :) In-Reply-To: <00e901c5df2e$8b3baa00$0a02a8c0@marcxp> References: <091c01c4375f$dce93bb0$0a02a8c0@marcxp> <04de01c495e9$e06f5dd0$0a02a8c0@marcxp> <059201c5dedd$efd0bba0$0a02a8c0@marcxp> <653bea160511011323m4b8eb641y@mail.gmail.com> <00e901c5df2e$8b3baa00$0a02a8c0@marcxp> Message-ID: <653bea160511011415x35b980cbx@mail.gmail.com> On 01/11/05, Marc Battyani wrote: > OK. Have you sent it to the iterate mailing list ? I just did. Apparently, your version was up-to-date wrt theirs. > Don't bother, in fact this version don't generate a .ufm file. :( > The Windows executable I've put on my site does though. > I'm modifying ttf2pt1 to generate a merged afm/ufm file, it will be cleaner. Thanks! [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] There are three types of people in the world; those who can count, and those who can't. From marc.battyani at fractalconcept.com Wed Nov 2 00:05:05 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 2 Nov 2005 01:05:05 +0100 Subject: [cl-typesetting-devel] cl-typesetting Unicode support :) References: <091c01c4375f$dce93bb0$0a02a8c0@marcxp><04de01c495e9$e06f5dd0$0a02a8c0@marcxp><059201c5dedd$efd0bba0$0a02a8c0@marcxp><653bea160511011323m4b8eb641y@mail.gmail.com><00e901c5df2e$8b3baa00$0a02a8c0@marcxp> <653bea160511011415x35b980cbx@mail.gmail.com> Message-ID: <016701c5df41$1419ca70$0a02a8c0@marcxp> Far? wrote: >On 01/11/05, Marc Battyani wrote: >> OK. Have you sent it to the iterate mailing list ? >I just did. Apparently, your version was up-to-date wrt theirs. OK >> Don't bother, in fact this version don't generate a .ufm file. :( >> The Windows executable I've put on my site does though. >> I'm modifying ttf2pt1 to generate a merged afm/ufm file, it will be cleaner. It's done now. I've posted the details on the cl-pdf mailing list. Marc From marc.battyani at fractalconcept.com Thu Nov 3 08:39:39 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 3 Nov 2005 09:39:39 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp> <028c01c5df92$443db080$0a02a8c0@marcxp> Message-ID: <066501c5e052$21bc8430$0a02a8c0@marcxp> I didn't get much feedback so far about the Unicode support in cl-pdf/cl-typesetting. Anybody has tested this on several implementations? Any patches for implementations other than LW? (Just look at the unicode-readme.txt for how to use Unicode in cl-pdf) Marc From andras at renyi.hu Thu Nov 3 09:04:13 2005 From: andras at renyi.hu (Andras Simon) Date: Thu, 3 Nov 2005 10:04:13 +0100 (MET) Subject: [cl-typesetting-devel] Unicode support feedback needed In-Reply-To: <066501c5e052$21bc8430$0a02a8c0@marcxp> References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp> <028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> Message-ID: On Thu, 3 Nov 2005, Marc Battyani wrote: > I didn't get much feedback so far about the Unicode support in > cl-pdf/cl-typesetting. > > Anybody has tested this on several implementations? > Any patches for implementations other than LW? > (Just look at the unicode-readme.txt for how to use Unicode in cl-pdf) Hi Marc, I got stuck first with general unicode problems (they've got nothing to do with cl-typesetting, but mostly with my dumbness), and then with the missing font problem. I'll try again in the weekend, using the instructions in unicode-readme. Andras ps. Should unicode-string-type return the most specific type for unicode strings? If so, then I think it could return simple-string in sbcl and simple-base-string in CLisp. From marc.battyani at fractalconcept.com Thu Nov 3 09:52:37 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 3 Nov 2005 10:52:37 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp> <028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> Message-ID: <06ca01c5e05c$52babcf0$0a02a8c0@marcxp> Andras Simon wrote: > On Thu, 3 Nov 2005, Marc Battyani wrote: > > > I didn't get much feedback so far about the Unicode support in > > cl-pdf/cl-typesetting. > > > > Anybody has tested this on several implementations? > > Any patches for implementations other than LW? > > (Just look at the unicode-readme.txt for how to use Unicode in cl-pdf) > > I got stuck first with general unicode problems (they've got nothing to do > with cl-typesetting, but mostly with my dumbness), and then with the missing > font problem. I'll try again in the weekend, using the instructions in > unicode-readme. Good. > ps. Should unicode-string-type return the most specific type for unicode > strings? If so, then I think it could return simple-string in sbcl and > simple-base-string in CLisp. It should return a string type which can accept 16 bits characters. So that (coerce (list (code-char 955)) 'string-type) is OK for instance. Marc From andras at renyi.hu Fri Nov 4 20:47:53 2005 From: andras at renyi.hu (Andras Simon) Date: Fri, 4 Nov 2005 21:47:53 +0100 (MET) Subject: [cl-typesetting-devel] Unicode support feedback needed In-Reply-To: <066501c5e052$21bc8430$0a02a8c0@marcxp> References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp> <028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> Message-ID: On Thu, 3 Nov 2005, Marc Battyani wrote: > I didn't get much feedback so far about the Unicode support in > cl-pdf/cl-typesetting. > > Anybody has tested this on several implementations? > Any patches for implementations other than LW? > (Just look at the unicode-readme.txt for how to use Unicode in cl-pdf) Hi Marc, The link http://www.fractalconcept.com/fcweb/download/ttf2pt1-src.zip in unicode-readme.txt is dead; I assume you meant http://www.fractalconcept.com/fcweb/download/ttf2pt1-src-cl-pdf.zip But that zip archive may be incomplete: [simon at localhost ttf2pt1-3.4.4]$ make scripts/unhtml README /bin/sh: scripts/unhtml: No such file or directory make: *** [README] Error 127 [simon at localhost ttf2pt1-3.4.4]$ and there's no scripts directory at all :( What the next problem is going to be is that I have no times.ttf file (and I'm afraid it's not something one can just download off the net.) But I'm not there yet... Andras From marc.battyani at fractalconcept.com Fri Nov 4 23:20:03 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sat, 5 Nov 2005 00:20:03 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp><066501c5e052$21bc8430$0a02a8c0@marcxp> Message-ID: <026201c5e196$495ca700$0a02a8c0@marcxp> Andras Simon wrote: > The link > > http://www.fractalconcept.com/fcweb/download/ttf2pt1-src.zip > in unicode-readme.txt is dead; I assume you meant OK, corrected. > http://www.fractalconcept.com/fcweb/download/ttf2pt1-src-cl-pdf.zip > > But that zip archive may be incomplete: > > [simon at localhost ttf2pt1-3.4.4]$ make > scripts/unhtml README > /bin/sh: scripts/unhtml: No such file or directory > make: *** [README] Error 127 > [simon at localhost ttf2pt1-3.4.4]$ > > and there's no scripts directory at all :( OK corrected. I've added all the ttf2pt1 sub-directories just in case. > What the next problem is going to be is that I have no times.ttf file (and I'm > afraid it's not something one can just download off the net.) But I'm not > there yet... Don't you have some unicode truetype font somewhere ? Otherwise I can email you one if you want. Thanks for persevering ;-) Marc From andras at renyi.hu Sun Nov 6 11:40:32 2005 From: andras at renyi.hu (Andras Simon) Date: Sun, 6 Nov 2005 12:40:32 +0100 (MET) Subject: [cl-typesetting-devel] Unicode support feedback needed In-Reply-To: <052c01c5e24e$c0b94160$0a02a8c0@marcxp> References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp><066501c5e052$21bc8430$0a02a8c0@marcxp> <04c901c5e233$dd29f0d0$0a02a8c0@marcxp> <052c01c5e24e$c0b94160$0a02a8c0@marcxp> Message-ID: On Sat, 5 Nov 2005, Marc Battyani wrote: > Hi Andras, > > > With > > > > (defmacro unicode-string-type () > > #+lispworks ''lispworks:simple-text-string > > #+sbcl ''simple-string > > #+(or allegro clisp) ''simple-base-string > > #-(or lispworks sbcl clisp allegro) ''string) > > Great! I will put this. > > > I could only make Allegro (8.0 beta) happy. The result of > > TYPESET::UNICODE-HELLO seems to be identical (not byte for byte, but > that's > > probably due to compression) to LW's output. > > > > CLISP chokes on Salza: > > OK, can you try without compression ? > (setf pdf:*compress-streams* nil) Not yet, because CLISP's got a problem with cl-pdf/pdf-geom.lisp too. I'll look into these offending files later today. > > > Compiling file > /home/simon/lisp_packages/marcb/cl-pdf/salza/compressor.lisp ... > > *** - invalid byte sequence #xCF #xEE in CHARSET:UTF-8 conversion > > > > SBCL's output is definitely very different from what LW and Allegro > produces, > > even though > > > > (coerce (list (code-char 955)) 'simple-string) > > > > does return a string. > > OK but is it correct ? CL-USER> (with-open-file (s "/tmp/usbcl" :external-format :utf-8 :direction :output :if-exists :supersede) (write-line (coerce (loop for i from 1 to (1- (expt 2 16)) collecting (code-char i)) 'simple-string) s) (values)) in SBCL, and CL-USER> (with-open-file (s "/tmp/uacl" :external-format :utf-8 :direction :output :if-exists :supersede) (write-line (coerce (loop for i from 1 to (1- (expt 2 16)) collecting (code-char i)) 'simple-base-string) s) (values)) in ACL give identical result, if this is what you meant. > BTW maybe you should put the mailing list in CC so that others are informed > too if they are interested. Oops, sorry, I hit Reply without looking at the headers. Andras From marc.battyani at fractalconcept.com Sun Nov 6 11:45:51 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 6 Nov 2005 12:45:51 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp><066501c5e052$21bc8430$0a02a8c0@marcxp><04c901c5e233$dd29f0d0$0a02a8c0@marcxp><052c01c5e24e$c0b94160$0a02a8c0@marcxp> Message-ID: <068c01c5e2c7$a319e640$0a02a8c0@marcxp> "Andras Simon" wrote: > On Sat, 5 Nov 2005, Marc Battyani wrote: > > > Hi Andras, > > > > > With > > > > > > (defmacro unicode-string-type () > > > #+lispworks ''lispworks:simple-text-string > > > #+sbcl ''simple-string > > > #+(or allegro clisp) ''simple-base-string > > > #-(or lispworks sbcl clisp allegro) ''string) > > > > Great! I will put this. > > > > > I could only make Allegro (8.0 beta) happy. The result of > > > TYPESET::UNICODE-HELLO seems to be identical (not byte for byte, but > > that's > > > probably due to compression) to LW's output. > > > > > > CLISP chokes on Salza: > > > > OK, can you try without compression ? > > (setf pdf:*compress-streams* nil) > > Not yet, because CLISP's got a problem with cl-pdf/pdf-geom.lisp too. I'll > look into these offending files later today. > > > > > > Compiling file > > /home/simon/lisp_packages/marcb/cl-pdf/salza/compressor.lisp ... > > > *** - invalid byte sequence #xCF #xEE in CHARSET:UTF-8 conversion > > > > > > SBCL's output is definitely very different from what LW and Allegro > > produces, > > > even though > > > > > > (coerce (list (code-char 955)) 'simple-string) > > > > > > does return a string. > > > > OK but is it correct ? > > > CL-USER> (with-open-file (s "/tmp/usbcl" :external-format :utf-8 :direction :output :if-exists :supersede) > (write-line > (coerce > (loop for i from 1 to (1- (expt 2 16)) > collecting (code-char i)) > 'simple-string) s) > (values)) > > in SBCL, and > > CL-USER> (with-open-file (s "/tmp/uacl" :external-format :utf-8 :direction :output :if-exists :supersede) > (write-line > (coerce > (loop for i from 1 to (1- (expt 2 16)) > collecting (code-char i)) > 'simple-base-string) s) > (values)) > > in ACL give identical result, if this is what you meant. I was talking about the pdf file. Does the one made with SBCL show up correctly in acrobat ? Marc From andras at renyi.hu Sun Nov 6 11:57:44 2005 From: andras at renyi.hu (Andras Simon) Date: Sun, 6 Nov 2005 12:57:44 +0100 (MET) Subject: [cl-typesetting-devel] Unicode support feedback needed In-Reply-To: <068c01c5e2c7$a319e640$0a02a8c0@marcxp> References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp><066501c5e052$21bc8430$0a02a8c0@marcxp><04c901c5e233$dd29f0d0$0a02a8c0@marcxp><052c01c5e24e$c0b94160$0a02a8c0@marcxp> <068c01c5e2c7$a319e640$0a02a8c0@marcxp> Message-ID: On Sun, 6 Nov 2005, Marc Battyani wrote: > I was talking about the pdf file. Does the one made with SBCL show up > correctly in acrobat ? No, that's why I wrote > > > > SBCL's output is definitely very different from what LW and Allegro > > > > produces, (Actually, I'm looking at the results in xpdf, because acrobat is way too buggy.) Shall I send you the pdfs? Andras From marc.battyani at fractalconcept.com Sun Nov 6 12:19:18 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 6 Nov 2005 13:19:18 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp><066501c5e052$21bc8430$0a02a8c0@marcxp><04c901c5e233$dd29f0d0$0a02a8c0@marcxp><052c01c5e24e$c0b94160$0a02a8c0@marcxp> <068c01c5e2c7$a319e640$0a02a8c0@marcxp> Message-ID: <06a101c5e2cc$4fd5e1f0$0a02a8c0@marcxp> "Andras Simon" wrote: > On Sun, 6 Nov 2005, Marc Battyani wrote: > > > > I was talking about the pdf file. Does the one made with SBCL show up > > correctly in acrobat ? > > No, that's why I wrote > > > > > > SBCL's output is definitely very different from what LW and Allegro > > > > > produces, > > (Actually, I'm looking at the results in xpdf, because acrobat is way too > buggy.) > > Shall I send you the pdfs? Yes, with compression off so that we can look inside. Marc From andras at renyi.hu Sun Nov 6 12:35:12 2005 From: andras at renyi.hu (Andras Simon) Date: Sun, 6 Nov 2005 13:35:12 +0100 (MET) Subject: [cl-typesetting-devel] Unicode support feedback needed In-Reply-To: <06a101c5e2cc$4fd5e1f0$0a02a8c0@marcxp> References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp><066501c5e052$21bc8430$0a02a8c0@marcxp><04c901c5e233$dd29f0d0$0a02a8c0@marcxp><052c01c5e24e$c0b94160$0a02a8c0@marcxp> <068c01c5e2c7$a319e640$0a02a8c0@marcxp> <06a101c5e2cc$4fd5e1f0$0a02a8c0@marcxp> Message-ID: On Sun, 6 Nov 2005, Marc Battyani wrote: > > Shall I send you the pdfs? > > Yes, with compression off so that we can look inside. Looks like this is a salza problem, because the uncompressed pdf is perfect! I put it up here anyway: http://www.math.bme.hu/~asimon/hello-u-sbcl.pdf Andras From marc.battyani at fractalconcept.com Sun Nov 6 13:40:59 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 6 Nov 2005 14:40:59 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp><066501c5e052$21bc8430$0a02a8c0@marcxp><04c901c5e233$dd29f0d0$0a02a8c0@marcxp><052c01c5e24e$c0b94160$0a02a8c0@marcxp> <068c01c5e2c7$a319e640$0a02a8c0@marcxp> <06a101c5e2cc$4fd5e1f0$0a02a8c0@marcxp> Message-ID: <06d301c5e2d7$b8c6f5e0$0a02a8c0@marcxp> "Andras Simon" wrote: > On Sun, 6 Nov 2005, Marc Battyani wrote: > > > > Shall I send you the pdfs? > > > > Yes, with compression off so that we can look inside. > > Looks like this is a salza problem, because the uncompressed pdf is perfect! > I put it up here anyway: > http://www.math.bme.hu/~asimon/hello-u-sbcl.pdf OK good. Thanks for testing. Marc From andras at renyi.hu Sun Nov 6 17:52:46 2005 From: andras at renyi.hu (Andras Simon) Date: Sun, 6 Nov 2005 18:52:46 +0100 (MET) Subject: [cl-typesetting-devel] Unicode support feedback needed In-Reply-To: References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp><066501c5e052$21bc8430$0a02a8c0@marcxp> <04c901c5e233$dd29f0d0$0a02a8c0@marcxp> <052c01c5e24e$c0b94160$0a02a8c0@marcxp> Message-ID: On Sun, 6 Nov 2005, Andras Simon wrote: > > > > > > CLISP chokes on Salza: > > > > OK, can you try without compression ? > > (setf pdf:*compress-streams* nil) > > Not yet, because CLISP's got a problem with cl-pdf/pdf-geom.lisp too. I'll > look into these offending files later today. salza/compressor.lisp has a line of funny characters, and pdf-geom.lisp has Spanish characters that apparently make CLISP sick. Removing them lets CLISP compile cl-typesetting with no errors. However, CL-USER> (pdf:load-ttu-font #P"times.ufm" #P"/tmp/times.ttf") *** - PRINT: not enough stack space for carrying out circularity analysis The following restarts are available: ABORT-REQUEST :R1 Abort handling SLIME request. Break 2 [3]> (maybe I only got an evaluation copy of CLISP :) The moral for me at least is that CLISP (or at least CLISP+Slime) is rather flaky. E.g. the error above should've brought up the slime debugger, and not the CLISP prompt. Any CLISP hacker care to comment on all this? Maybe it's just a question of invoking CLISP with the right command line arguments. Andras From divanov at aha.ru Mon Nov 7 19:17:32 2005 From: divanov at aha.ru (Dmitriy Ivanov) Date: Mon, 7 Nov 2005 22:17:32 +0300 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> Message-ID: <000701c5e3cf$f8ae6000$be01a8c0@digo> Hello Marc, | I didn't get much feedback so far about the Unicode support in | cl-pdf/cl-typesetting. | | Anybody has tested this on several implementations? | Any patches for implementations other than LW? | (Just look at the unicode-readme.txt for how to use Unicode in cl-pdf) At the first glance, works for me on LWW 4.4.6 and AcroReader 5.1 both with and without compressing fonts. Even Cyrillic alphabet is displayed fine. Thanks! Unfortunately, due to huge size of TTF, they are hardly of practical use when embedded without subsetting. Moreover, neither copy-and-paste nor the Find dialog works in Acrobat yet :-( Bellow are the small patches. cl-pdf ====== 1) ttu-font.lisp The original version signals on loading ttu font, but this one works (defun load-ttu-font (ufm-file &optional ttf-file) (let ((ttufm (read-ufm-file ufm-file 'ttu-font-metrics))) (when ttf-file (with-open-file (in ttf-file :direction :input :element-type '(unsigned-byte 8)) ;was :default (setf (length1 ttufm) (file-length in) (binary-data ttufm) (make-array (length1 ttufm) :element-type '(unsigned-byte 8))) (read-sequence (binary-data ttufm) in))) ttufm)) 2) pdf-base.lisp (defun show-text-on-next-line (string) (write-cid-string string) (write-line "'" *page-stream*)) (defun rotate* (radians) (let* ((s (sin radians)) (c (cos radians))) (format *page-stream* "~10f ~10f ~10f ~10f 0.0 0.0 cm~%" c s (- s) c))) cl-typesetting ============ 1) IMHO, defconstant* is an unfortunate name as it neither correlates with let*/do* nor list* convention. 2) We would better have (defmacro coerce-to-unicode-string (object) ...) instead of (coerce thing (unicode-string-type)) I have neither disassembled nor profiled but gut feels that coerce is rather slow. Maybe a symbol-macro should be used instead of the usual macro: (define-symbol-macro unicode-string-type #+lispworks 'lispworks:simple-text-string #-(or lispworks) 'string) 3) tables.lisp I don't see the following change for (defun stroke-table ...) committed - (unless (zerop border) ; next, draw table border + ;; Next, draw table border if not suppressed + (unless (or (zerop border) (null cell-border)) -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Mon Nov 7 23:36:57 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 8 Nov 2005 00:36:57 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> Message-ID: <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> "Dmitriy Ivanov" wrote: > At the first glance, works for me on LWW 4.4.6 and AcroReader 5.1 both > with and without compressing fonts. Even Cyrillic alphabet is displayed > fine. Thanks! Cool :) > Unfortunately, due to huge size of TTF, they are hardly of practical use > when embedded without subsetting. Moreover, neither copy-and-paste > nor the Find dialog works in Acrobat yet :-( Yes I know... > Bellow are the small patches. [...] > 1) IMHO, defconstant* is an unfortunate name as it neither correlates with > let*/do* nor list* convention. Yes. No problem, what do you prefer ? > 2) We would better have > (defmacro coerce-to-unicode-string (object) ...) > instead of > (coerce thing (unicode-string-type)) > > I have neither disassembled nor profiled but gut feels that coerce is rather > slow. Yes. Do you have code for this ? > Maybe a symbol-macro should be used instead of the usual macro: > (define-symbol-macro unicode-string-type > #+lispworks 'lispworks:simple-text-string > #-(or lispworks) 'string) Done. > 3) tables.lisp > I don't see the following change for (defun stroke-table ...) committed > > - (unless (zerop border) ; next, draw table border > + ;; Next, draw table border if not suppressed > + (unless (or (zerop border) (null cell-border)) Added. Now next major change: Binary format. IIRC you already have such a thing for LW ? Cheers, Marc From marc.battyani at fractalconcept.com Mon Nov 7 23:37:04 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 8 Nov 2005 00:37:04 +0100 Subject: [cl-typesetting-devel] Small fixes for Unicode. References: <091c01c4375f$dce93bb0$0a02a8c0@marcxp><04de01c495e9$e06f5dd0$0a02a8c0@marcxp> <059201c5dedd$efd0bba0$0a02a8c0@marcxp> Message-ID: <0d6801c5e3f4$289f48a0$0a02a8c0@marcxp> I've committed the latest small fixes. Marc From divanov at aha.ru Tue Nov 8 10:17:49 2005 From: divanov at aha.ru (Dmitriy Ivanov) Date: Tue, 8 Nov 2005 13:17:49 +0300 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> Message-ID: <000a01c5e452$f7b03a60$be01a8c0@digo> Hello, Marc! MB>> Bellow are the small patches. MB> [...] MB>> 1) IMHO, defconstant* is an unfortunate name as it neither correlates MB>> with let*/do* nor list* convention. MB> MB> Yes. No problem, what do you prefer ? Maybe defconstant-if-none, not sure. BTW, I would greatly apreciate if the couple of simple loops in (defun read-ufm-file), font-metrics.lisp, were rewritten via loop instead of iter. MB>> 2) We would better have MB>> (defmacro coerce-to-unicode-string (object) ...) MB>> instead of MB>> (coerce thing (unicode-string-type)) MB>> MB>> I have neither disassembled nor profiled but gut feels that coerce is MB> rather slow. MB> MB> Yes. Do you have code for this ? I've been thinking. MB> Now next major change: Binary format. MB> IIRC you already have such a thing for LW ? Yes, with my di-pdf.lisp, I do write into binary *pdf-stream*. With TTF, this should be enhanced. AFAIR, we should also open *page-stream* in binary mode - this needs further elaboration. I am trying to figure out at the moment. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From fahree at gmail.com Tue Nov 8 13:10:36 2005 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Tue, 8 Nov 2005 08:10:36 -0500 Subject: [cl-typesetting-devel] Unicode support feedback needed In-Reply-To: <000a01c5e452$f7b03a60$be01a8c0@digo> References: <074c01c503f3$13b432c0$0a02a8c0@marcxp> <010401c5dd86$555ecec0$0a02a8c0@marcxp> <05a801c5dee2$c081e2c0$0a02a8c0@marcxp> <066601c5deea$eb9bb190$0a02a8c0@marcxp> <015e01c5df40$dbf4c640$0a02a8c0@marcxp> <028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> <000a01c5e452$f7b03a60$be01a8c0@digo> Message-ID: <653bea160511080510u7da6cd85w@mail.gmail.com> On 08/11/05, Dmitriy Ivanov wrote: > Maybe defconstant-if-none, not sure. > Actually, the notes from the CMUCL and SBCL compiler say that unless the constant is going to be inlined everywhere it's used, it's much clever to use defparameter, which avoids what only amounts to waste of memory by counter-productive copying. But who am I to tell? So maybe have it (define-constant-structure ...) and expand to defparameter on CMUCL and SBCL... [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] "When buying and selling are controlled by legislation, the first things to be bought and sold are legislators." -- P.J. O'Rourke From marc.battyani at fractalconcept.com Tue Nov 8 12:48:55 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 8 Nov 2005 13:48:55 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> <000a01c5e452$f7b03a60$be01a8c0@digo> Message-ID: <000001c5e488$54278b10$0a02a8c0@marcxp> Dmitriy Ivanov wrote: > > BTW, I would greatly apreciate if the couple of simple loops in (defun > read-ufm-file), font-metrics.lisp, were rewritten via loop instead of iter. No pb. > MB>> 2) We would better have > MB>> (defmacro coerce-to-unicode-string (object) ...) > MB>> instead of > MB>> (coerce thing (unicode-string-type)) > MB>> > MB>> I have neither disassembled nor profiled but gut feels that coerce is > MB> rather slow. > MB> > MB> Yes. Do you have code for this ? > > I've been thinking. OK. > MB> Now next major change: Binary format. > MB> IIRC you already have such a thing for LW ? > > Yes, with my di-pdf.lisp, I do write into binary *pdf-stream*. With TTF, > this should be enhanced. OK. > AFAIR, we should also open *page-stream* in binary mode - this needs further > elaboration. I am trying to figure out at the moment. Why would you want to do that ? The content streams are in ASCII normally. Excepted for the characters in strings but they can be encoded if needed. The Unicode ones are already encoded. Marc From marc.battyani at fractalconcept.com Tue Nov 8 17:26:01 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 8 Nov 2005 18:26:01 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp> <010401c5dd86$555ecec0$0a02a8c0@marcxp> <05a801c5dee2$c081e2c0$0a02a8c0@marcxp> <066601c5deea$eb9bb190$0a02a8c0@marcxp> <015e01c5df40$dbf4c640$0a02a8c0@marcxp> <028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> <000a01c5e452$f7b03a60$be01a8c0@digo> <653bea160511080510u7da6cd85w@mail.gmail.com> Message-ID: <009b01c5e489$7d9311d0$0a02a8c0@marcxp> "Far?" wrote: >On 08/11/05, Dmitriy Ivanov wrote: >> Maybe defconstant-if-none, not sure. >> >Actually, the notes from the CMUCL and SBCL compiler say that unless >the constant is going to be inlined everywhere it's used, it's much >clever to use defparameter, which avoids what only amounts to waste of >memory by counter-productive copying. But who am I to tell? >So maybe have it (define-constant-structure ...) and expand to >defparameter on CMUCL and SBCL... If the compilers don't use the fact that it's a constant for optimization then let's just put a defparameter. It will be simpler. Marc From marc.battyani at fractalconcept.com Tue Nov 8 22:59:26 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 8 Nov 2005 23:59:26 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp> <066601c5deea$eb9bb190$0a02a8c0@marcxp> <015e01c5df40$dbf4c640$0a02a8c0@marcxp> <028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> <000a01c5e452$f7b03a60$be01a8c0@digo> <653bea160511080510u7da6cd85w@mail.gmail.com> <009b01c5e489$7d9311d0$0a02a8c0@marcxp> <653bea160511081115k5f55d1adw@mail.gmail.com> Message-ID: <01da01c5e4b8$112267b0$0a02a8c0@marcxp> "Far?" wrote: >On 08/11/05, Marc Battyani wrote: >> If the compilers don't use the fact that it's a constant for optimization >> then let's just put a defparameter. It will be simpler. >Well, IIUC, these compilers will systematically inline the structure >and do constant-folding. I had read a page that said this could lead >to multiple copies of the structure, but I can't actually imagine how >that could be. > >In any case, DEFINE-CONSTANT-STRUCTURE seems an appropriate name. And >the current implementation seems OK. OK for me. Marc From divanov at aha.ru Wed Nov 9 11:06:48 2005 From: divanov at aha.ru (Dmitriy Ivanov) Date: Wed, 9 Nov 2005 14:06:48 +0300 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> <000a01c5e452$f7b03a60$be01a8c0@digo> <000001c5e488$54278b10$0a02a8c0@marcxp> Message-ID: <000101c5e51d$b4f45190$be01a8c0@digo> "Marc Battyani" wrote: |> AFAIR, we should also open *page-stream* in binary mode - this needs |> further |> elaboration. I am trying to figure out at the moment. | | Why would you want to do that ? The content streams are in ASCII | normally. Excepted for the characters in strings but they can be | encoded if needed. The Unicode ones are already encoded. I see. No need to touch *page-stream*. To open the document stream in binary mode, the following works for me. (in-package pdf) (defmethod write-document ((filename pathname) &optional (document *document*)) (with-open-file (stream filename :direction :output :if-exists :supersede :element-type #+pdf-binary '(unsigned-byte 8) #-pdf-binary 'base-char :external-format +external-format+) (write-document stream document))) ;;; Works with CID fonts, not for code-page encoded. (defmethod write-stream-content ((content string)) (loop for char across content do (write-byte (char-code char) pdf::*pdf-stream*))) -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Wed Nov 9 12:52:26 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 9 Nov 2005 13:52:26 +0100 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> <000a01c5e452$f7b03a60$be01a8c0@digo> <000001c5e488$54278b10$0a02a8c0@marcxp> <000101c5e51d$b4f45190$be01a8c0@digo> Message-ID: <033601c5e52c$702aebf0$0a02a8c0@marcxp> "Dmitriy Ivanov" wrote: > "Marc Battyani" wrote: > > |> AFAIR, we should also open *page-stream* in binary mode - this needs > |> further > |> elaboration. I am trying to figure out at the moment. > | > | Why would you want to do that ? The content streams are in ASCII > | normally. Excepted for the characters in strings but they can be > | encoded if needed. The Unicode ones are already encoded. > > I see. No need to touch *page-stream*. > To open the document stream in binary mode, the following works for me. > > (in-package pdf) > > (defmethod write-document ((filename pathname) &optional (document > *document*)) > (with-open-file (stream filename > :direction :output :if-exists :supersede > :element-type #+pdf-binary '(unsigned-byte 8) > #-pdf-binary 'base-char > :external-format +external-format+) > (write-document stream document))) > > ;;; Works with CID fonts, not for code-page encoded. > (defmethod write-stream-content ((content string)) > (loop for char across content > do (write-byte (char-code char) pdf::*pdf-stream*))) Are you sure it's enough ? I mean there are lots of #'format, #'write-line, etc. in the #'write-object methods. Marc From divanov at aha.ru Wed Nov 9 14:28:53 2005 From: divanov at aha.ru (Dmitriy Ivanov) Date: Wed, 9 Nov 2005 17:28:53 +0300 Subject: [cl-typesetting-devel] Unicode support feedback needed References: <074c01c503f3$13b432c0$0a02a8c0@marcxp><08b301c5198a$52a9fb20$0a02a8c0@marcxp><010401c5dd86$555ecec0$0a02a8c0@marcxp><05a801c5dee2$c081e2c0$0a02a8c0@marcxp><066601c5deea$eb9bb190$0a02a8c0@marcxp><015e01c5df40$dbf4c640$0a02a8c0@marcxp><028c01c5df92$443db080$0a02a8c0@marcxp> <066501c5e052$21bc8430$0a02a8c0@marcxp> <000701c5e3cf$f8ae6000$be01a8c0@digo> <0d6701c5e3f4$2466f620$0a02a8c0@marcxp> <000a01c5e452$f7b03a60$be01a8c0@digo> <000001c5e488$54278b10$0a02a8c0@marcxp> <000101c5e51d$b4f45190$be01a8c0@digo> <033601c5e52c$702aebf0$0a02a8c0@marcxp> Message-ID: <000001c5e539$f6a14d70$be01a8c0@digo> "Marc Battyani" wrote: |> To open the document stream in binary mode, the following works for |> me. |> |> (in-package pdf) |> |> (defmethod write-document ((filename pathname) &optional (document |> *document*)) |> (with-open-file (stream filename |> :direction :output :if-exists :supersede |> :element-type #+pdf-binary '(unsigned-byte 8) |> #-pdf-binary 'base-char |> :external-format +external-format+) |> (write-document stream document))) |> |> ;;; Works with CID fonts, not for code-page encoded. |> (defmethod write-stream-content ((content string)) |> (loop for char across content |> do (write-byte (char-code char) pdf::*pdf-stream*))) | | Are you sure it's enough ? I mean there are lots of #'format, | #'write-line, etc. in the #'write-object methods. As a matter of fact, that is enough for LW provided all lw:text-string's are already "packed" into streams, which are about to be output in byte-by-byte manner. Base characters are written automatically as *pdf-stream* is bivalent. For other implementation, that can be problematic... -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From a_bakic at yahoo.com Wed Nov 30 11:48:43 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 30 Nov 2005 03:48:43 -0800 (PST) Subject: [cl-typesetting-devel] right alignment of table cell content Message-ID: <20051130114843.70332.qmail@web34608.mail.mud.yahoo.com> Hi, I don't know yet if this is a feature or a bug: If I write within a cell body (with-style (:h-align :center) the cell content becomes centered. However, if I write (with-style (:h-align :right) the content is still just centered. Only if I write (paragraph (:h-align :right) will the content become right-aligned. I'll probably read the implementation code, but any insight is appreciated. Thanks, Alex __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ From marc.battyani at fractalconcept.com Wed Nov 30 12:03:59 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 30 Nov 2005 13:03:59 +0100 Subject: [cl-typesetting-devel] right alignment of table cell content References: <20051130114843.70332.qmail@web34608.mail.mud.yahoo.com> Message-ID: <0c1501c5f5a6$25da0ab0$0a02a8c0@marcxp> "Aleksandar Bakic" wrote: >I don't know yet if this is a feature or a bug: If I write within a cell body > >(with-style (:h-align :center) > >the cell content becomes centered. However, if I write > >(with-style (:h-align :right) > >the content is still just centered. Only if I write > >(paragraph (:h-align :right) > >will the content become right-aligned. > >I'll probably read the implementation code, but any insight is appreciated. with-style is for the text style (font, sont-size, color, etc.) while paragraph has the layout properties (alignement, margins, etc.) Marc From a_bakic at yahoo.com Wed Nov 30 14:37:02 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 30 Nov 2005 06:37:02 -0800 (PST) Subject: [cl-typesetting-devel] right alignment of table cell content In-Reply-To: <0c1501c5f5a6$25da0ab0$0a02a8c0@marcxp> Message-ID: <20051130143702.94403.qmail@web34606.mail.mud.yahoo.com> > within a cell body > > > >(with-style (:h-align :center) > > > >the cell content becomes centered. However, if I write > > > >(with-style (:h-align :right) > > > >the content is still just centered. [...] > with-style is for the text style (font, sont-size, color, etc.) while > paragraph has the layout properties (alignement, margins, etc.) Thanks. I suppose, the above is a bug (with-style's :center changing the alignment of the enclosing cell). Alex __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/