From philpot at ISI.EDU Fri Jun 10 00:48:37 2005 From: philpot at ISI.EDU (Andrew Philpot) Date: Thu, 09 Jun 2005 17:48:37 -0700 Subject: [cl-typesetting-devel] PDF::READ-JPEG-FILE and certain JPGs Message-ID: <200506100048.j5A0mbXE008439@blombos.isi.edu> It seems that not all JPEGs are created equal, at least as regards PDF::READ-JPEG-FILE. QUICKHELP2(48): (pdf::read-jpeg-file "kidfriendly-200-50.jpg") Error: eof encountered on stream # [condition type: END-OF-FILE] Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart). 1: Abort entirely from this (lisp) process. [1] QUICKHELP2(49): :reset QUICKHELP2(50): (pdf::read-jpeg-file "kidfriendly-200-50b.jpg") # I created the second above by rewriting the first using 'xv', no doubt lossily, which apparently demotes the version: blombos.isi.edu 1237% file kidfriendly-200-50*.jpg kidfriendly-200-50b.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, "CREATOR: XV Version 3.10a Rev:", 1 x 1 kidfriendly-200-50.jpg: JPEG image data, JFIF standard 1.02, resolution (DPI), 72 x 72 But what gives? I often get the jpgs from either digital cameras or photoshopping collaborators. Should I tell them to convert to JFIF 1.01 (is that even meaningful) or is this something that CL-PDF should/might be upgraded to understand? Thanks, Andrew ps: images are available at http://www.isi.edu/~philpot/cl-pdf/ for the curious. From fahree at gmail.com Mon Jun 13 12:30:15 2005 From: fahree at gmail.com (=?ISO-8859-1?Q?Far=E9?=) Date: Mon, 13 Jun 2005 08:30:15 -0400 Subject: [cl-typesetting-devel] Fwd: top-level misuses defconstant In-Reply-To: <653bea160506130423168ed46b@mail.gmail.com> References: <653bea160506130423168ed46b@mail.gmail.com> Message-ID: <653bea16050613053046ab6226@mail.gmail.com> In cl-typesetting-current, top-level.lisp uses defconstant to define a list, which is non-conformant to ANSI CL, and which SBCL refuses to compile unless you force non-conformant behaviour. The defconstant +paper-sizes+ should be a defvar, or a defconstant*, where defconstant* is defined to be defconstant on those implementations that support it, or defvar on others, or defconstant wrapped in something proper in SBCL. http://www.sbcl.org/manual/Defining-Constants.html [ Fran?ois-Ren? ?VB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] In a five year period we can get one superb programming language. Only we can't control when the five year period will begin. -- Alan Perlis From marc.battyani at fractalconcept.com Mon Jun 13 14:27:01 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 13 Jun 2005 16:27:01 +0200 Subject: [cl-typesetting-devel] Fwd: top-level misuses defconstant References: <653bea160506130423168ed46b@mail.gmail.com> <653bea16050613053046ab6226@mail.gmail.com> Message-ID: <02e501c57023$f7994330$0a02a8c0@marcxp> "Far?" writes: >In cl-typesetting-current, top-level.lisp uses defconstant to define a >list, which is non-conformant to ANSI CL, and which SBCL refuses to >compile unless you force non-conformant behaviour. The defconstant >+paper-sizes+ should be a defvar, or a defconstant*, where >defconstant* is defined to be defconstant on those implementations >that support it, or defvar on others, or defconstant wrapped in >something proper in SBCL. > >http://www.sbcl.org/manual/Defining-Constants.html OK I will put a defparameter. Marc From marc.battyani at fractalconcept.com Mon Jun 13 14:31:17 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 13 Jun 2005 16:31:17 +0200 Subject: [cl-typesetting-devel] PDF::READ-JPEG-FILE and certain JPGs References: <200506100048.j5A0mbXE008439@blombos.isi.edu> Message-ID: <02f101c57024$8fdff580$0a02a8c0@marcxp> "Andrew Philpot" wrote: > > It seems that not all JPEGs are created equal, at least as regards > PDF::READ-JPEG-FILE. > > QUICKHELP2(48): (pdf::read-jpeg-file "kidfriendly-200-50.jpg") > Error: eof encountered on stream > # #x725992aa> > [condition type: END-OF-FILE] > > Restart actions (select using :continue): > 0: Return to Top Level (an "abort" restart). > 1: Abort entirely from this (lisp) process. > [1] QUICKHELP2(49): :reset > QUICKHELP2(50): (pdf::read-jpeg-file "kidfriendly-200-50b.jpg") > # > > I created the second above by rewriting the first using 'xv', no doubt > lossily, which apparently demotes the version: > > blombos.isi.edu 1237% file kidfriendly-200-50*.jpg > kidfriendly-200-50b.jpg: JPEG image data, JFIF standard 1.01, aspect ratio, > "CREATOR: XV Version 3.10a Rev:", 1 x 1 > kidfriendly-200-50.jpg: JPEG image data, JFIF standard 1.02, resolution > (DPI), 72 x 72 > > But what gives? I often get the jpgs from either digital cameras or > photoshopping collaborators. Should I tell them to convert to JFIF > 1.01 (is that even meaningful) or is this something that CL-PDF > should/might be upgraded to understand? cl-pdf tries to get the width and height from the jpeg file. Maybe this should be changed to be compatible with new format version. > ps: images are available at http://www.isi.edu/~philpot/cl-pdf/ for the > curious. OK got them. I will have a look at them ASAP. Marc From divanov at aha.ru Tue Jun 14 09:41:54 2005 From: divanov at aha.ru (Dmitriy Ivanov) Date: Tue, 14 Jun 2005 13:41:54 +0400 Subject: [cl-typesetting-devel] Fwd: top-level misuses defconstant References: <653bea160506130423168ed46b@mail.gmail.com> <653bea16050613053046ab6226@mail.gmail.com> Message-ID: <000701c570cb$679c5da0$c54202c3@digo> Hello Far?, | In cl-typesetting-current, top-level.lisp uses defconstant to define a | list, which is non-conformant to ANSI CL, and which SBCL refuses to | compile unless you force non-conformant behaviour. The defconstant | +paper-sizes+ should be a defvar, or a defconstant*, where | defconstant* is defined to be defconstant on those implementations | that support it, or defvar on others, or defconstant wrapped in | something proper in SBCL. | | http://www.sbcl.org/manual/Defining-Constants.html AFAIK, defining a list with defconstant is not prohibited by ANSI CL explicitly. IMHO, dealing with constants in SBCL is a SBCL convenience issue, not a general ANSI CL non-conformance issue. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From edi at agharta.de Tue Jun 14 11:42:53 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 14 Jun 2005 13:42:53 +0200 Subject: [cl-typesetting-devel] Fwd: top-level misuses defconstant In-Reply-To: <000701c570cb$679c5da0$c54202c3@digo> (Dmitriy Ivanov's message of "Tue, 14 Jun 2005 13:41:54 +0400") References: <653bea160506130423168ed46b@mail.gmail.com> <653bea16050613053046ab6226@mail.gmail.com> <000701c570cb$679c5da0$c54202c3@digo> Message-ID: On Tue, 14 Jun 2005 13:41:54 +0400, "Dmitriy Ivanov" wrote: > AFAIK, defining a list with defconstant is not prohibited by ANSI CL > explicitly. Certainly not. I think the point is that you usually first compile a file and then load it and you don't know (from the ANSI standard) whether the DEFCONSTANT form takes effect twice in this case. In most Lisps (not only SBCL) this is the case but the other implementations aren't as anal as SBCL and will just try to Do The Right Thing[TM]. > IMHO, dealing with constants in SBCL is a SBCL convenience issue, > not a general ANSI CL non-conformance issue. Kind of. I think a library that purports to run on SBCL has to deal with it somehow. I'd say it's a (minor) wart in the spec and the SBCL language lawyers found it... :) Cheers, Edi. From peter at gigamonkeys.com Wed Jun 1 03:59:35 2005 From: peter at gigamonkeys.com (Peter Seibel) Date: Tue, 31 May 2005 20:59:35 -0700 Subject: [cl-typesetting-devel] Laying out sub-boxes? Message-ID: So to layout, say, a business card using cl-typesetting (as opposed to raw cl-pdf as I did before) it seems like it'd make some sense to generate a few different chunks of content and then place them, as a unit, the right places on the page. Are there any examples of this in test.lisp or can someone explain how I might do it. -Peter -- Peter Seibel peter at gigamonkeys.com Lisp is the red pill. -- John Fraser, comp.lang.lisp From peter at gigamonkeys.com Wed Jun 1 04:13:45 2005 From: peter at gigamonkeys.com (Peter Seibel) Date: Tue, 31 May 2005 21:13:45 -0700 Subject: [cl-typesetting-devel] Laying out sub-boxes? In-Reply-To: (Peter Seibel's message of "Tue, 31 May 2005 20:59:35 -0700") References: Message-ID: Peter Seibel writes: > So to layout, say, a business card using cl-typesetting (as opposed to > raw cl-pdf as I did before) it seems like it'd make some sense to > generate a few different chunks of content and then place them, as a > unit, the right places on the page. Are there any examples of this in > test.lisp or can someone explain how I might do it. As usual, right after I asked, I went back and figured it out, more or less. Anyway, if anyone has any advice or examples, I'm still interested but I did figure out you can compile different bits of text with compile-text and then draw them with draw-block. -Peter -- Peter Seibel peter at gigamonkeys.com Lisp is the red pill. -- John Fraser, comp.lang.lisp From peter at gigamonkeys.com Wed Jun 1 04:45:41 2005 From: peter at gigamonkeys.com (Peter Seibel) Date: Tue, 31 May 2005 21:45:41 -0700 Subject: [cl-typesetting-devel] Laying out sub-boxes? In-Reply-To: (Peter Seibel's message of "Tue, 31 May 2005 21:13:45 -0700") References: Message-ID: Peter Seibel writes: > Peter Seibel writes: > >> So to layout, say, a business card using cl-typesetting (as opposed to >> raw cl-pdf as I did before) it seems like it'd make some sense to >> generate a few different chunks of content and then place them, as a >> unit, the right places on the page. Are there any examples of this in >> test.lisp or can someone explain how I might do it. > > As usual, right after I asked, I went back and figured it out, more or > less. Anyway, if anyone has any advice or examples, I'm still > interested but I did figure out you can compile different bits of text > with compile-text and then draw them with draw-block. Okay, so now I've got a real question. In order to layout my boxes correctly I need to know what their natural sizes are. But the values returned by compute-boxes-natural-size don't make much sense to me. For instance, the following code shows the natural heights of three lines of text to be around 6 inches. Or do I have some units problem? -Peter (defpackage :business-card (:use :cl :typeset)) (in-package :business-card) (defconstant +points-per-inch+ 72) (defun natural-height (text) (typeset::compute-boxes-natural-size (typeset::boxes text) 'typeset::dy)) (defun natural-width (text) (typeset::compute-boxes-natural-size (typeset::boxes text) 'typeset::dx)) (defmacro with-natural-sizes ((width height) text &body body) `(let ((,width (natural-width ,text)) (,height (natural-height ,text))) (format t "text: ~a;~,25twidth: ~,2f;~,25theight: ~,2f~%" ',text ,width ,height) , at body)) (defun business-card (&optional (file #P"/tmp/hello.pdf")) (let ((width (* 3.5d0 +points-per-inch+)) (height (* 2d0 +points-per-inch+))) (pdf:with-document () (pdf:with-page () (let ((tagline (compile-text () (paragraph (:h-align :center :font "Times-Italic" :font-size 8) "You can hire a billion monkeys or you can hire me." :eol))) (name (compile-text () (paragraph (:h-align :center :font "Helvetica" :font-size 12) "Peter Seibel" :eol))) (company (compile-text () (paragraph (:h-align :center :font "Helvetica" :font-size 11) "Gigamonkeys Consulting" :eol))) (network-one-line (compile-text () (paragraph (:h-align :center :font "Helvetica" :font-size 8) (put-string (format nil "peter at gigamonkeys.com ~c www.gigamonkeys.com" (code-char 127))) :eol))) (address-one-line (compile-text () (paragraph (:h-align :center :font "Helvetica" :font-size 8) (put-string (format nil "6205 Mathieu Avenue, Oakland, California, 94618 ~c 415.203.3716" (code-char 127))) :eol))) (address-chunk (compile-text () (paragraph (:h-align :left :font "Helvetica" :font-size 8) "6205 Mathieu Avenue" :eol) (paragraph (:h-align :left :font "Helvetica" :font-size 8) "Okaland, California" :eol) (paragraph (:h-align :left :font "Helvetica" :font-size 8) "94618" :eol))) (network-chunk (compile-text () (paragraph (:h-align :right :font "Helvetica" :font-size 8) "peter at gigamonkeys.com" :eol "www.gigamonkeys.com" :eol "415.203.3716" :eol)))) (declare (ignorable address-chunk network-chunk address-one-line network-one-line)) (pdf:set-rgb-fill 1.0 1.0 1.0) (pdf:set-line-width .1) (pdf:translate 100 100) (pdf:set-rgb-stroke 0.0 0.0 0.0) (pdf:rectangle 0 0 width height) (pdf:close-and-stroke) (pdf:set-rgb-fill 0.0 0.0 0.0) (with-natural-sizes (w h) tagline (typeset::draw-block tagline 0 (- height 10) width h)) (with-natural-sizes (w h) name (typeset::draw-block name 0 (- height 30) width h)) (with-natural-sizes (w h) company (typeset::draw-block company 0 (- height 50) width h)) (with-natural-sizes (w h) network-one-line) (with-natural-sizes (w h) address-one-line) (with-natural-sizes (w h) address-chunk (typeset::draw-block address-chunk 0 h (/ width 2) h)) (with-natural-sizes (w h) network-chunk (typeset::draw-block network-chunk (/ width 2) h (/ width 2) h)))) (pdf:write-document file)))) -- Peter Seibel peter at gigamonkeys.com Lisp is the red pill. -- John Fraser, comp.lang.lisp From marc.battyani at fractalconcept.com Wed Jun 1 08:09:34 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 1 Jun 2005 10:09:34 +0200 Subject: [cl-typesetting-devel] Laying out sub-boxes? References: Message-ID: <04e401c56681$40163a20$0a02a8c0@marcxp> "Peter Seibel" writes: > Peter Seibel writes: > > > Peter Seibel writes: > > > >> So to layout, say, a business card using cl-typesetting (as opposed to > >> raw cl-pdf as I did before) it seems like it'd make some sense to > >> generate a few different chunks of content and then place them, as a > >> unit, the right places on the page. Are there any examples of this in > >> test.lisp or can someone explain how I might do it. > > > > As usual, right after I asked, I went back and figured it out, more or > > less. Anyway, if anyone has any advice or examples, I'm still > > interested but I did figure out you can compile different bits of text > > with compile-text and then draw them with draw-block. > > Okay, so now I've got a real question. In order to layout my boxes > correctly I need to know what their natural sizes are. But the values > returned by compute-boxes-natural-size don't make much sense to me. > For instance, the following code shows the natural heights of three > lines of text to be around 6 inches. Or do I have some units problem? You are doing something much to complex for such a simple layout. cl-typesetting is more high level than that... ;-) Here is how I would do it: (defpackage :business-card (:use :cl :typeset)) (in-package :business-card) (defconstant +points-per-inch+ 72) The first card example is for the all centered model: (defun business-card1 (&optional (file #P"/tmp/card1.pdf")) (let ((width (* 3.5d0 +points-per-inch+)) (height (* 2d0 +points-per-inch+))) (pdf:with-document () (pdf:with-page () (let ((center-block (compile-text () (paragraph (:h-align :center :font "Times-Italic" :font-size 8) "You can hire a billion monkeys or you can hire me." :eol :vfill (with-style (:font "Helvetica" :font-size 12) "Peter Seibel" :eol) (with-style (:font "Helvetica" :font-size 11) "Gigamonkeys Consulting" :eol) :vfill (with-style (:font "Helvetica" :font-size 8) (format-string "peter at gigamonkeys.com ~c www.gigamonkeys.com" (code-char 127))) :eol (format-string "6205 Mathieu Avenue, Oakland, California, 94618 ~c 415.203.3716" (code-char 127)))))) (pdf:translate 50 650) (typeset::draw-block center-block 0 height width height :v-align :fill :border 1))) (pdf:write-document file)))) Notes: it's better to use format-string instead of format nil, draw-block can draw a border, vfill and hfill are cool. Second example is with left and right aligned texts: (defun business-card2 (&optional (file #P"/tmp/card2.pdf")) (let ((width (* 3.5d0 +points-per-inch+)) (height (* 2d0 +points-per-inch+))) (pdf:with-document () (pdf:with-page () (let ((center-block (compile-text () (paragraph (:h-align :center :font "Times-Italic" :font-size 8) "You can hire a billion monkeys or you can hire me." :eol :vfill (with-style (:font "Helvetica" :font-size 12) "Peter Seibel" :eol) (with-style (:font "Helvetica" :font-size 11) "Gigamonkeys Consulting" :vfill :vfill)))) (left-block (compile-text () (paragraph (:h-align :left :font "Helvetica" :font-size 8) "6205 Mathieu Avenue" :eol "Okaland, California" :eol "94618"))) (right-block (compile-text () (paragraph (:h-align :right :font "Helvetica" :font-size 8) "peter at gigamonkeys.com" :eol "www.gigamonkeys.com" :eol "415.203.3716")))) (pdf:translate 50 650) (typeset::draw-block left-block 0 height width height :v-align :bottom :border 1) (typeset::draw-block center-block 0 height width height :v-align :fill) (typeset::draw-block right-block 0 height width height :v-align :bottom))) (pdf:write-document file)))) In this example, the layout could have been done completely with cl-typesetting in one block like this: (defun business-card3 (&optional (file #P"/tmp/card3.pdf")) (let ((width (* 3.5d0 +points-per-inch+)) (height (* 2d0 +points-per-inch+))) (pdf:with-document () (pdf:with-page () (let ((center-block (compile-text () (paragraph (:h-align :center :font "Times-Italic" :font-size 8) "You can hire a billion monkeys or you can hire me." :eol :vfill (with-style (:font "Helvetica" :font-size 12) "Peter Seibel" :eol) (with-style (:font "Helvetica" :font-size 11) "Gigamonkeys Consulting" :vfill)) (paragraph (:h-align :fill :font "Helvetica" :font-size 8) "6205 Mathieu Avenue" :hfill "peter at gigamonkeys.com" :eol "Okaland, California" :hfill "www.gigamonkeys.com" :eol "94618" :hfill "415.203.3716")))) (pdf:translate 50 650) (typeset::draw-block center-block 0 height width height :v-align :fill :border 1))) (pdf:write-document file)))) I've attached the generated pdfs. As you can see the glyphs layout is much nicer. Just zoom it and compare with the raw cl-pdf layout. (look at the "You" for instance) Marc -------------- next part -------------- A non-text attachment was scrubbed... Name: card3.pdf Type: application/pdf Size: 1566 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: card1.pdf Type: application/pdf Size: 1571 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: card2.pdf Type: application/pdf Size: 1601 bytes Desc: not available URL: From peter at gigamonkeys.com Wed Jun 1 18:46:35 2005 From: peter at gigamonkeys.com (Peter Seibel) Date: Wed, 01 Jun 2005 11:46:35 -0700 Subject: [cl-typesetting-devel] Laying out sub-boxes? In-Reply-To: <04e401c56681$40163a20$0a02a8c0@marcxp> (Marc Battyani's message of "Wed, 1 Jun 2005 10:09:34 +0200") References: <04e401c56681$40163a20$0a02a8c0@marcxp> Message-ID: "Marc Battyani" writes: > "Peter Seibel" writes: > >> Peter Seibel writes: >> >> > Peter Seibel writes: >> > >> >> So to layout, say, a business card using cl-typesetting (as opposed to >> >> raw cl-pdf as I did before) it seems like it'd make some sense to >> >> generate a few different chunks of content and then place them, as a >> >> unit, the right places on the page. Are there any examples of this in >> >> test.lisp or can someone explain how I might do it. >> > >> > As usual, right after I asked, I went back and figured it out, more or >> > less. Anyway, if anyone has any advice or examples, I'm still >> > interested but I did figure out you can compile different bits of text >> > with compile-text and then draw them with draw-block. >> >> Okay, so now I've got a real question. In order to layout my boxes >> correctly I need to know what their natural sizes are. But the values >> returned by compute-boxes-natural-size don't make much sense to me. >> For instance, the following code shows the natural heights of three >> lines of text to be around 6 inches. Or do I have some units problem? > > You are doing something much to complex for such a simple layout. > cl-typesetting is more high level than that... ;-) > > Here is how I would do it: Excellent. I'll play with this later today--gotta go talk to some Java guys about using Lisp. ;-) -Peter -- Peter Seibel peter at gigamonkeys.com Lisp is the red pill. -- John Fraser, comp.lang.lisp From peter at gigamonkeys.com Thu Jun 2 22:53:15 2005 From: peter at gigamonkeys.com (Peter Seibel) Date: Thu, 02 Jun 2005 15:53:15 -0700 Subject: [cl-typesetting-devel] Centering a table? Message-ID: I tried all the obvious (to me) ways but I can't figure out how to center a table. What am I missing? -Peter -- Peter Seibel peter at gigamonkeys.com Lisp is the red pill. -- John Fraser, comp.lang.lisp From marc.battyani at fractalconcept.com Fri Jun 3 11:45:56 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Fri, 3 Jun 2005 13:45:56 +0200 Subject: [cl-typesetting-devel] Centering a table? References: Message-ID: <06ad01c56831$ceb4aa80$0a02a8c0@marcxp> "Peter Seibel" writes: > I tried all the obvious (to me) ways but I can't figure out how to > center a table. What am I missing? The code to process the h-align slot for instance... ;-) For some reason I removed this and now tables are v-mode objects. IIRC it was because it didn't worked correctly when split tables were added. I will try to look at this. Marc From peter at javamonkey.com Tue Jun 7 03:18:23 2005 From: peter at javamonkey.com (Peter Seibel) Date: Mon, 6 Jun 2005 20:18:23 -0700 Subject: [cl-typesetting-devel] Placing text very specifically? Message-ID: <1110FC2F-9751-496E-BF33-16B57D6EAE1B@javamonkey.com> I'm trying to build a logo by placing two words in very close proximity. I'd like to use cl-typesetting rather than raw cl-pdf in order to get the nice kerning. But I can't figure out how to absolutely position the various bits of text. I'm sure there's an easy way but I figure Marc or someone can explain it to me more quickly than I find it be groveling through the source. -Peter -- Peter Seibel Gigamonkeys Consulting peter at gigamonkeys.com www.gigamonkeys.com From marc.battyani at fractalconcept.com Tue Jun 7 11:42:13 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 7 Jun 2005 13:42:13 +0200 Subject: [cl-typesetting-devel] Placing text very specifically? References: <1110FC2F-9751-496E-BF33-16B57D6EAE1B@javamonkey.com> Message-ID: <020a01c56b55$f359ada0$0a02a8c0@marcxp> "Peter Seibel" writes: > I'm trying to build a logo by placing two words in very close > proximity. I'd like to use cl-typesetting rather than raw cl-pdf in > order to get the nice kerning. But I can't figure out how to > absolutely position the various bits of text. I'm sure there's an > easy way but I figure Marc or someone can explain it to me more > quickly than I find it be groveling through the source. You can either use 2 draw blocks or add some fixed horizontal spacing with #'hspace (though it will be an expandable spacing) or add a h-spacing box: The spacing can even be negative. "Peter" (hspace 2) "Seibel" :eol "Peter" (hspace -2) "Seibel" :eol "Peter" (typeset::add-box (make-instance 'typeset::h-spacing :dx -10 :max-expansion 0 :max-compression 0 :expansibility 0.0 :compressibility 0.0)) "Seibel" :eol Marc From peter at gigamonkeys.com Tue Jun 7 14:41:39 2005 From: peter at gigamonkeys.com (Peter Seibel) Date: Tue, 7 Jun 2005 07:41:39 -0700 Subject: [cl-typesetting-devel] Placing text very specifically? In-Reply-To: <020a01c56b55$f359ada0$0a02a8c0@marcxp> References: <1110FC2F-9751-496E-BF33-16B57D6EAE1B@javamonkey.com> <020a01c56b55$f359ada0$0a02a8c0@marcxp> Message-ID: <3B47FC18-3C4A-430D-BB34-973D554B1B83@gigamonkeys.com> On Jun 7, 2005, at 4:42 AM, Marc Battyani wrote: > "Peter Seibel" writes: > > >> I'm trying to build a logo by placing two words in very close >> proximity. I'd like to use cl-typesetting rather than raw cl-pdf in >> order to get the nice kerning. But I can't figure out how to >> absolutely position the various bits of text. I'm sure there's an >> easy way but I figure Marc or someone can explain it to me more >> quickly than I find it be groveling through the source. >> > > You can either use 2 draw blocks or add some fixed horizontal > spacing with > #'hspace (though it will be an expandable spacing) or add a h- > spacing box: > The spacing can even be negative. Hmmm. I tried the two draw blocks but it seemed that if they overlapped, one would occlude the other. I'll give this approach a whirl. > "Peter" (hspace 2) "Seibel" :eol > "Peter" (hspace -2) "Seibel" :eol > "Peter" (typeset::add-box (make-instance 'typeset::h-spacing :dx -10 > :max-expansion 0 :max-compression 0 :expansibility > 0.0 :compressibility > 0.0)) "Seibel" :eol -Peter -- Peter Seibel Gigamonkeys Consulting peter at gigamonkeys.com www.gigamonkeys.com