From divanov at aha.ru Tue May 9 13:31:46 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Tue, 9 May 2006 17:31:46 +0400 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <878FB132-05B5-4214-BF5C-CA3E87F7C874@mac.com> <1a8401c656f0$09a584e0$1402a8c0@marcx2> Message-ID: <000001c6736c$f2b66620$8100a8c0@digo> Hello folks, Is anybody trying to set *use-exact-char-boxes* to true? I have noticed that text is actually shift a bit down within table cells and draw-block when *use-exact-char-boxes* is false (default). Setting it to true seems to make a page look prettier but reveals problems with *leading*. (IMHO, the leading or leading-ratio slot should be added to the text-style class.) Are there any general directions about *use-exact-char-boxes*? -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From divanov at aha.ru Tue May 9 16:02:05 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Tue, 9 May 2006 20:02:05 +0400 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <878FB132-05B5-4214-BF5C-CA3E87F7C874@mac.com><1a8401c656f0$09a584e0$1402a8c0@marcx2> <000001c6736c$f2b66620$8100a8c0@digo> Message-ID: <000101c67381$ed6f7d40$8100a8c0@digo> I wrote: | (IMHO, the leading or leading-ratio slot | should be added to the text-style class.) I meant to say that a kind of "layout-time contextual action" is needed to set *leading* correctly in fit-lines or in another place. Adding the slot to the text-style will not help. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Thu May 11 21:33:59 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 11 May 2006 23:33:59 +0200 Subject: [cl-typesetting-devel] Patch to quiet warnings References: Message-ID: <099f01c67542$9d5766c0$1402a8c0@marcx2> "Peter Seibel" wrote: > Here's a patch to quiet the warnings from cl-typesetting. [snipped patch...] Thanks a lot. I will apply it :) BTW Sorry for the late reply, overbooked as usual... :-( Marc From marc.battyani at fractalconcept.com Thu May 11 21:55:34 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 11 May 2006 23:55:34 +0200 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <878FB132-05B5-4214-BF5C-CA3E87F7C874@mac.com><1a8401c656f0$09a584e0$1402a8c0@marcx2> <000001c6736c$f2b66620$8100a8c0@digo> Message-ID: <09d601c67545$a125a570$1402a8c0@marcx2> "Dmitriy Ivanov" wrote: > Hello folks, > > Is anybody trying to set *use-exact-char-boxes* to true? > > I have noticed that text is actually shift a bit down within table cells > and > draw-block when *use-exact-char-boxes* is false (default). Setting it to > true seems to make a page look prettier but reveals problems with > *leading*. > (IMHO, the leading or leading-ratio slot should be added to the text-style > class.) > > Are there any general directions about *use-exact-char-boxes*? Hi Dmitriy, If you set *use-exact-char-boxes* to t then the characters on a line will use their real bounding box like it is defined in the char metrics. If it is set to t then the height of the bounding box will be replaced by the value of *leading* to ensure that the lines have all the same leading. In fact generally you want to have the same leading for all the lines. I added *use-exact-char-boxes* for the math mode to deal with the special math characters. BTW it was nice to meet you at the ECLM. I hope you have recovered your voice... ;-) Marc From divanov at aha.ru Fri May 12 07:00:17 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Fri, 12 May 2006 11:00:17 +0400 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <878FB132-05B5-4214-BF5C-CA3E87F7C874@mac.com><1a8401c656f0$09a584e0$1402a8c0@marcx2> <000001c6736c$f2b66620$8100a8c0@digo> <09d601c67545$a125a570$1402a8c0@marcx2> Message-ID: <000001c67591$c1579cd0$8100a8c0@digo> Hello Marc, | Hi Dmitriy, | | If you set *use-exact-char-boxes* to t then the characters on a line | will use their real bounding box like it is defined in the char | metrics. If it is set to t then the height of the bounding box will be | replaced by the value of *leading* to ensure that the lines have all | the same leading. Not sure. According to make-char-box, if *use-exact-char-boxes* is set to nil, the height is replaced by *leading*. On the contrary, when it is t, the height is determined by ascender and descender. The same should be done for make-white-char-box, see my version below. With this approach the *leading* is really gone so I have to the following hack to fit-lines: (defmethod fit-lines ((content text-content) dx dy &optional (v-align :top)(advance t)) ... ;snip (setf (boxes text-line)(nreverse line-boxes)) ;; ugly hack: somehow catch and respect current *leading* (when *use-exact-char-boxes* (let ((delta-size (- *leading* (dy text-line)))) (when (plusp delta-size) (incf (dy text-line) delta-size) (incf (internal-baseline text-line) delta-size)))) ...) (defun make-white-char-box (char &optional (trimmable-p t)) ;; DI: In exact mode, we must also use ascender for not making baseline too large. (if *use-exact-char-boxes* (multiple-value-bind (width ascender descender) (pdf:get-char-size char *font* *font-size*) (setq width (* width *text-x-scale*)) (make-instance 'white-char-box :trimmable-p trimmable-p :dx width :dy (- ascender descender) :baseline ascender :max-expansion (* width 10) :max-compression (* width 0.7) :expansibility (* width 2.0) :compressibility width)) (let ((width (* (pdf:get-char-width char *font* *font-size*) *text-x-scale*))) (make-instance 'white-char-box :trimmable-p trimmable-p :dx width :dy *leading* :baseline *font-size* :max-expansion (* width 10) :max-compression (* width 0.7) :expansibility (* width 2.0) :compressibility width)))) | In fact generally you want to have the same leading for all the lines. | I added *use-exact-char-boxes* for the math mode to deal with the | special math characters. It would be better to have both *use-exact-char-boxes* and *leading* working together :-) | BTW it was nice to meet you at the ECLM. I hope you have recovered your | voice... ;-) It is fine now, thanks :-) -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Fri May 12 08:10:04 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Fri, 12 May 2006 10:10:04 +0200 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <878FB132-05B5-4214-BF5C-CA3E87F7C874@mac.com><1a8401c656f0$09a584e0$1402a8c0@marcx2><000001c6736c$f2b66620$8100a8c0@digo><09d601c67545$a125a570$1402a8c0@marcx2> <000001c67591$c1579cd0$8100a8c0@digo> Message-ID: <0ad501c6759b$79b95e90$1402a8c0@marcx2> Dmitriy Ivanov wrote: > | If you set *use-exact-char-boxes* to t then the characters on a line > | will use their real bounding box like it is defined in the char > | metrics. If it is set to t then the height of the bounding box will be > | replaced by the value of *leading* to ensure that the lines have all > | the same leading. > > Not sure. According to make-char-box, if *use-exact-char-boxes* is set to > nil, the height is replaced by *leading*. Yes, it's a typo in my reply, the second t should be nil instead. ;-) > On the contrary, when it is t, the > height is determined by ascender and descender. The same should be done > for > make-white-char-box, see my version below. With this approach the > *leading* > is really gone so I have to the following hack to fit-lines: OK but why? I mean the *use-exact-char-boxes* is only used for the math mode it is not supposed to be used in normal mode. > (defmethod fit-lines ((content text-content) dx dy &optional (v-align > :top)(advance t)) > ... ;snip > (setf (boxes text-line)(nreverse line-boxes)) > ;; ugly hack: somehow catch and respect current *leading* > (when *use-exact-char-boxes* > (let ((delta-size (- *leading* (dy text-line)))) > (when (plusp delta-size) > (incf (dy text-line) delta-size) > (incf (internal-baseline text-line) delta-size)))) > ...) > > (defun make-white-char-box (char &optional (trimmable-p t)) > ;; DI: In exact mode, we must also use ascender for not making baseline > too large. > (if *use-exact-char-boxes* > (multiple-value-bind (width ascender descender) > (pdf:get-char-size char *font* *font-size*) > (setq width (* width *text-x-scale*)) > (make-instance 'white-char-box :trimmable-p trimmable-p > :dx width > :dy (- ascender descender) :baseline ascender > :max-expansion (* width 10) :max-compression (* > width > 0.7) > :expansibility (* width 2.0) :compressibility > width)) > (let ((width (* (pdf:get-char-width char *font* *font-size*) > *text-x-scale*))) > (make-instance 'white-char-box :trimmable-p trimmable-p > :dx width > :dy *leading* :baseline *font-size* > :max-expansion (* width 10) :max-compression (* > width > 0.7) > :expansibility (* width 2.0) :compressibility > width)))) > > | In fact generally you want to have the same leading for all the lines. > | I added *use-exact-char-boxes* for the math mode to deal with the > | special math characters. > > It would be better to have both *use-exact-char-boxes* and *leading* > working > together :-) OK but again why? Using *use-exact-char-boxes* when not in math mode will give non homogeneous leading for lines. For instance a line with "man" will have a much smaller leading than one with "Man p". Marc From divanov at aha.ru Fri May 12 13:40:22 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Fri, 12 May 2006 17:40:22 +0400 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <878FB132-05B5-4214-BF5C-CA3E87F7C874@mac.com><1a8401c656f0$09a584e0$1402a8c0@marcx2><000001c6736c$f2b66620$8100a8c0@digo><09d601c67545$a125a570$1402a8c0@marcx2> <000001c67591$c1579cd0$8100a8c0@digo> <0ad501c6759b$79b95e90$1402a8c0@marcx2> Message-ID: <000101c675c9$a5a1f9d0$8100a8c0@digo> "Marc Battyani" wrote: |> It would be better to have both *use-exact-char-boxes* and *leading* |> working together :-) | | OK but again why? Using *use-exact-char-boxes* when not in math mode | will give non homogeneous leading for lines. | For instance a line with "man" will have a much smaller leading than | one with "Man p". I would like to use exact char boxes not only in math mode but also in other places. As I have noticed earlier, text would look prettier within table cells and draw-block. When *use-exact-char-boxes* is nil, the internal baseline of the first line in block is equal to dy and that leads to shifting the entire text down. The simplest way to take the *leading* into account I have found was hacking fit-lines. IMHO, in general, dealing with leading during layout instead of storing it within every char box sounds more consistent. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Fri May 12 14:39:27 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Fri, 12 May 2006 16:39:27 +0200 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <878FB132-05B5-4214-BF5C-CA3E87F7C874@mac.com><1a8401c656f0$09a584e0$1402a8c0@marcx2><000001c6736c$f2b66620$8100a8c0@digo><09d601c67545$a125a570$1402a8c0@marcx2> <000001c67591$c1579cd0$8100a8c0@digo> <0ad501c6759b$79b95e90$1402a8c0@marcx2> <000101c675c9$a5a1f9d0$8100a8c0@digo> Message-ID: <0bbd01c675d1$df3b54e0$1402a8c0@marcx2> "Dmitriy Ivanov" wrote: > "Marc Battyani" wrote: > > |> It would be better to have both *use-exact-char-boxes* and *leading* > |> working together :-) > | > | OK but again why? Using *use-exact-char-boxes* when not in math mode > | will give non homogeneous leading for lines. > | For instance a line with "man" will have a much smaller leading than > | one with "Man p". > > I would like to use exact char boxes not only in math mode but also in > other > places. As I have noticed earlier, text would look prettier within table > cells and draw-block. When *use-exact-char-boxes* is nil, the internal > baseline of the first line in block is equal to dy and that leads to > shifting the entire text down. Maybe the problem is here. Have you a simple example so that I can look at it and see exactly what you mean? > The simplest way to take the *leading* into account I have found was > hacking > fit-lines. > > IMHO, in general, dealing with leading during layout instead of storing it > within every char box sounds more consistent. I'm not sure of that. The logic here is that we normalize the height of the characters. Marc From divanov at aha.ru Mon May 15 06:23:51 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Mon, 15 May 2006 10:23:51 +0400 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <878FB132-05B5-4214-BF5C-CA3E87F7C874@mac.com><1a8401c656f0$09a584e0$1402a8c0@marcx2><000001c6736c$f2b66620$8100a8c0@digo><09d601c67545$a125a570$1402a8c0@marcx2> <000001c67591$c1579cd0$8100a8c0@digo> <0ad501c6759b$79b95e90$1402a8c0@marcx2> <000101c675c9$a5a1f9d0$8100a8c0@digo> <0bbd01c675d1$df3b54e0$1402a8c0@marcx2> Message-ID: <000401c677ea$00d3a200$8100a8c0@digo> "Marc Battyani" wrote: |> I would like to use exact char boxes not only in math mode but also in |> other places. As I have noticed earlier, text would look prettier |> within table cells and draw-block. When *use-exact-char-boxes* is nil, |> the internal baseline of the first line in block is equal to dy and |> that leads to shifting the entire text down. | | Maybe the problem is here. Have you a simple example so that I can look | at it and see exactly what you mean? Here is the simplest example. You could see an unpleasant effect with padding equal to 0 and *leading-ratio* equal to 1. Within the first table, text in the bottom line breaches the border. Within the second one, the leading 1.0 is not actually respected. (defun test-char-mode (&optional (file (lw:current-pathname "char-mode.pdf"))) (tt:with-document () (let ((tt:*default-font* (pdf::get-font "Helvetica")) (tt::*leading-ratio* 1.) content) (let ((tt::*use-exact-char-boxes* nil)) (setq content (tt:compile-text () (tt:paragraph (:top-margin 10 :h-align :center) (tt:format-string "*leading-ratio*=~S *use-exact-char-boxes*=~S" tt::*leading-ratio* tt::*use-exact-char-boxes*)) (tt:table (:col-widths '(300 100) :border 1/2 :padding 0 :cell-padding 0) (tt:row () (tt:cell () (tt:with-style (:h-align :left :font-size 20) (dotimes (i 5) (tt:put-string "The cool Common Lisp typesetting system. ")))) (tt:cell () "test"))))) (tt:draw-pages content :margins #(30 30 30 30))) (let ((tt::*use-exact-char-boxes* t)) (setq content (tt:compile-text () (tt:paragraph (:top-margin 10 :h-align :center) (tt:format-string "*leading-ratio*=~S *use-exact-char-boxes*=~S" tt::*leading-ratio* tt::*use-exact-char-boxes*)) (tt:table (:col-widths '(300 100) :border 1/2 :padding 0 :cell-padding 0) (tt:row () (tt:cell () (tt:with-style (:h-align :left :font-size 20) (dotimes (i 5) (tt:put-string "The cool Common Lisp typesetting system. ")))) (tt:cell () "test"))))) (tt:draw-pages content :margins #(30 30 30 30) :break :after)) (pdf:write-document file)))) (test-char-mode) -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Mon May 15 08:04:52 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 15 May 2006 10:04:52 +0200 Subject: [cl-typesetting-devel] *use-exact-char-boxes* Message-ID: <04b501c677f6$3f209d40$1402a8c0@marcx2> "Dmitriy Ivanov" wrote: > "Marc Battyani" wrote: > > |> I would like to use exact char boxes not only in math mode but also in > |> other places. As I have noticed earlier, text would look prettier > |> within table cells and draw-block. When *use-exact-char-boxes* is nil, > |> the internal baseline of the first line in block is equal to dy and > |> that leads to shifting the entire text down. > | > | Maybe the problem is here. Have you a simple example so that I can look > | at it and see exactly what you mean? > > Here is the simplest example. You could see an unpleasant effect with > padding equal to 0 and *leading-ratio* equal to 1. > > Within the first table, text in the bottom line breaches the border. > Within > the second one, the leading 1.0 is not actually respected. > > (defun test-char-mode (&optional (file (lw:current-pathname > "char-mode.pdf"))) > (tt:with-document () > (let ((tt:*default-font* (pdf::get-font "Helvetica")) > (tt::*leading-ratio* 1.) > content) > (let ((tt::*use-exact-char-boxes* nil)) > (setq content (tt:compile-text () > (tt:paragraph (:top-margin 10 :h-align :center) > (tt:format-string "*leading-ratio*=~S *use-exact-char-boxes*=~S" > tt::*leading-ratio* > tt::*use-exact-char-boxes*)) > (tt:table (:col-widths '(300 100) :border 1/2 :padding 0 > :cell-padding 0) > (tt:row () > (tt:cell () > (tt:with-style (:h-align :left :font-size 20) > (dotimes (i 5) > (tt:put-string "The cool Common Lisp typesetting system. > ")))) > (tt:cell () "test"))))) > (tt:draw-pages content :margins #(30 30 30 30))) > (let ((tt::*use-exact-char-boxes* t)) > (setq content (tt:compile-text () > (tt:paragraph (:top-margin 10 :h-align :center) > (tt:format-string "*leading-ratio*=~S *use-exact-char-boxes*=~S" > tt::*leading-ratio* > tt::*use-exact-char-boxes*)) > (tt:table (:col-widths '(300 100) :border 1/2 :padding 0 > :cell-padding 0) > (tt:row () > (tt:cell () > (tt:with-style (:h-align :left :font-size 20) > (dotimes (i 5) > (tt:put-string "The cool Common Lisp typesetting system. > ")))) > (tt:cell () "test"))))) > (tt:draw-pages content :margins #(30 30 30 30) :break :after)) > (pdf:write-document file)))) > > (test-char-mode) OK looks like the descent is not taken into account in the first case and it should be fixed but, as I already wrote, using exact-char-boxes will lead to non uniform line spacing. See your example modified: (pdf attached) (defun test-char-mode (&optional (file #P"/char-mode.pdf")) (tt:with-document () (let ((tt::*default-font* (pdf::get-font "Helvetica")) (tt::*leading-ratio* 1.) content) (let ((tt::*use-exact-char-boxes* nil)) (setq content (tt:compile-text () (tt:paragraph (:top-margin 10 :h-align :center) (tt:format-string "*leading-ratio*=~S *use-exact-char-boxes*=~S" tt::*leading-ratio* tt::*use-exact-char-boxes*)) (tt:table (:col-widths '(300 100) :border 1/2 :padding 0 :cell-padding 0) (tt:row () (tt:cell () (tt:with-style (:h-align :left :font-size 20) (tt:put-string "Apa Apaaa Apaaaa Apaaa Apaaaa Apaaa Apaaa Apaaa") (tt:put-string "aaa aaaaa aaaaaa aaaaaa aaaaaa aaaaaa aaaaaa aaaaa aaaa aaaaa aaaaa ") (dotimes (i 4) (tt:put-string "The cool Common Lisp typesetting system. ")))) (tt:cell () "test"))))) (tt:draw-pages content :margins #(30 30 30 30))) (let ((tt::*use-exact-char-boxes* t)) (setq content (tt:compile-text () (tt:paragraph (:top-margin 10 :h-align :center) (tt:format-string "*leading-ratio*=~S *use-exact-char-boxes*=~S" tt::*leading-ratio* tt::*use-exact-char-boxes*)) (tt:table (:col-widths '(300 100) :border 1/2 :padding 0 :cell-padding 0) (tt:row () (tt:cell () (tt:with-style (:h-align :left :font-size 20) (tt:put-string "Apa Apaaa Apaaaa Apaaa Apaaaa Apaaa Apaaa Apaaa") (tt:put-string "aaa aaaaa aaaaaa aaaaaa aaaaaa aaaaaa aaaaaa aaaaa aaaa aaaaa aaaaa ") (dotimes (i 5) (tt:put-string "The cool Common Lisp typesetting system. ")))) (tt:cell () "test"))))) (tt:draw-pages content :margins #(30 30 30 30) :break :after)) (pdf:write-document file)))) Marc From marc.battyani at fractalconcept.com Mon May 15 08:06:33 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 15 May 2006 10:06:33 +0200 Subject: [cl-typesetting-devel] *use-exact-char-boxes* Message-ID: <04bc01c677f6$7b246240$1402a8c0@marcx2> "Marc Battyani" wrote: >See your example modified: (pdf attached) Here it is... Marc -------------- next part -------------- A non-text attachment was scrubbed... Name: char-mode.pdf Type: application/pdf Size: 1410 bytes Desc: not available URL: From divanov at aha.ru Mon May 15 11:45:00 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Mon, 15 May 2006 15:45:00 +0400 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <04bc01c677f6$7b246240$1402a8c0@marcx2> Message-ID: <000f01c67815$03bb7120$8100a8c0@digo> "Marc Battyani" wrote: |> See your example modified: (pdf attached) | | Here it is... What is the difference from the previous one? -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Mon May 15 12:04:09 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 15 May 2006 14:04:09 +0200 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <04bc01c677f6$7b246240$1402a8c0@marcx2> <000f01c67815$03bb7120$8100a8c0@digo> Message-ID: <005001c67817$ac57bd50$1402a8c0@marcx2> "Dmitriy Ivanov" wrote: > What is the difference from the previous one? Lines with small characters like "aaa.." don't have the same spacing as the lines with "Ap..." and this is not good for normal text. Marc From divanov at aha.ru Mon May 15 14:26:31 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Mon, 15 May 2006 18:26:31 +0400 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <04bc01c677f6$7b246240$1402a8c0@marcx2> <000f01c67815$03bb7120$8100a8c0@digo> <005001c67817$ac57bd50$1402a8c0@marcx2> Message-ID: <001001c6782b$9c1c8740$8100a8c0@digo> "Marc Battyani" wrote: |> What is the difference from the previous one? | | Lines with small characters like "aaa.." don't have the same spacing as | the lines with "Ap..." and this is not good for normal text. I see. And it is unlikely easy to improve :-(. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Mon May 15 15:07:42 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 15 May 2006 17:07:42 +0200 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <04bc01c677f6$7b246240$1402a8c0@marcx2> <000f01c67815$03bb7120$8100a8c0@digo> <005001c67817$ac57bd50$1402a8c0@marcx2> <001001c6782b$9c1c8740$8100a8c0@digo> Message-ID: <013501c67831$5071be40$1402a8c0@marcx2> "Dmitriy Ivanov" wrote: > "Marc Battyani" wrote: > > |> What is the difference from the previous one? > | > | Lines with small characters like "aaa.." don't have the same spacing as > | the lines with "Ap..." and this is not good for normal text. > > I see. And it is unlikely easy to improve :-(. Improve? Well it is designed for that so it is ok IMO ;-) In fact, the only bug is the character descent missing in the first table. In make-char-box: :dy *leading* :baseline *font-size* should be replaced by something like: :dy *leading* :baseline (- *font-size* *descender*) With *descender* being the maximum descender for the font. Or better by adddding *base-line*: :dy *leading* :baseline *base-line* I will look at this when I find some time (so probably not this week) Marc From divanov at aha.ru Sat May 20 06:17:54 2006 From: divanov at aha.ru (Dmitriy Ivanov) Date: Sat, 20 May 2006 10:17:54 +0400 Subject: [cl-typesetting-devel] *use-exact-char-boxes* References: <04bc01c677f6$7b246240$1402a8c0@marcx2> <000f01c67815$03bb7120$8100a8c0@digo> <005001c67817$ac57bd50$1402a8c0@marcx2> <001001c6782b$9c1c8740$8100a8c0@digo> <013501c67831$5071be40$1402a8c0@marcx2> Message-ID: <000001c67bd5$283af200$8100a8c0@digo> "Marc Battyani" wrote: | >>> What is the difference from the previous one? | >> | >> Lines with small characters like "aaa.." don't have the same spacing | >> as the lines with "Ap..." and this is not good for normal text. |> |> I see. And it is unlikely easy to improve :-(. | | Improve? Well it is designed for that so it is ok IMO ;-) | | In fact, the only bug is the character descent missing in the first | table. |...snip...| I see another unpleasant effect of embedding the leading into every character box. Please try the before mentioned example with leading-ration 2. The distance between lines does increase. But it also implies the increase between the last text line and the bottom border of the cell! The extra vertical space may be quite reasonable in tables with several rows but is not convenient in forms where you draw a lot of separate fields with text delineated by a rectangle. -- Sincerely, Dmitriy Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Fri May 26 07:15:29 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Fri, 26 May 2006 09:15:29 +0200 Subject: [cl-typesetting-devel] Fw: Serious hyphenation bug Message-ID: <023001c68094$2b68a030$1402a8c0@marcx2> [Forwarding Fabrice's email to the cl-typesetting list] ----- Original Message ----- From: "Fabrice Popineau" To: Cc: Sent: Thursday, May 25, 2006 11:11 PM Subject: Serious hyphenation bug > > Peter> I think I have discovered the cause of this bug. > > You suggested that the hyphen-cmp-char-lists was faulty and I'm afraid > you are right. Your version of this function is much clearer and more > efficient. I must admit that I have sent the code to Marc before heavy > testing :-( > > So it would be nice that the faulty function be replaced in Marc's > repository. > > BTW, I'll do further tests and report about that. I have a large db for > the French case. > > Thanks, > > Fabrice Popineau > ------------------------ > e-mail: Fabrice.Popineau at supelec.fr | The difference between > theory > voice-mail: +33 (0) 387764715 | and practice, is that > surface-mail: Supelec, 2 rue E. Belin, | theoretically, > F-57070 Metz | there is no difference ! > From Fabrice.Popineau at supelec.fr Sat May 27 21:43:07 2006 From: Fabrice.Popineau at supelec.fr (Fabrice Popineau) Date: Sat, 27 May 2006 23:43:07 +0200 Subject: [cl-typesetting-devel] hyphenation Message-ID: This is a follow-up on the previous bug report about my faulty implementation of the TeX hyphenation algorithm. I have now tested the attached version against a list of 500 French words and the result is ok on all of them. I have added the left-hyphen-min and right-hyphen-min bounds to suppress hyphenation points occuring too close from start or from end of the word. These bounds exist in latex. I have added also the hyphen-hyphenate-string taken from a previous cl-typesetting implementation, but I wonder if this function couldn't be made simpler. Basically, the hyphen-show-hyphens function does more or less the same. Any idea? Best regards, -- Fabrice Popineau ------------------------ e-mail: Fabrice.Popineau at supelec.fr | The difference between theory voice-mail: +33 (0) 387764715 | and practice, is that surface-mail: Supelec, 2 rue E. Belin, | theoretically, F-57070 Metz | there is no difference ! -------------- next part -------------- A non-text attachment was scrubbed... Name: hyphenation.lisp Type: application/octet-stream Size: 10687 bytes Desc: not available URL: