From divanov at aha.ru Wed Mar 3 05:57:27 2004 From: divanov at aha.ru (Dmitri Ivanov) Date: Wed, 3 Mar 2004 08:57:27 +0300 Subject: [cl-pdf-devel] Multi-page tables and layout References: <06b501c3fcab$6f89e0e0$0303a8c0@marc2><16446.25586.351774.46397@mccarthy.genworks.com> <06ea01c3fcaf$8a86c3f0$0303a8c0@marc2> Message-ID: <000001c400e4$86f2f770$a44d02c3@digo> Hello, I am on my way to split a table automatically and want your opinion. My approach is to put separate rows into a vbox. Do you think this is the right direction? What was the intention of the splitable-p slot in the table-row class? The weak point is that we don't have the position of the last item stroked into the page at our disposal. Is it possible for make-filled-vbox to return a dy-left or dy-allocated value indicating how much vertical space was actually used? We do need a kind of top-level layout staff akin to DefDoc. Its unit conversion module could also be of value. -- Sincerely, Dmitri Ivanov lisp.ystok.ru From divanov at aha.ru Sat Mar 13 08:10:48 2004 From: divanov at aha.ru (Dmitri Ivanov) Date: Sat, 13 Mar 2004 11:10:48 +0300 Subject: [cl-pdf-devel] Font loading on demand References: <08e801c3e6b7$e9f50b20$0303a8c0@marc2><08aa01c3eb11$a75d0b10$0303a8c0@marc2><001001c3ebcb$c439da00$6e4302c3@digo><0e5f01c3ebf2$f5607c20$0303a8c0@marc2><000d01c3ecc3$8ecddda0$da5702c3@digo><136c01c3ecc6$6655e1d0$0303a8c0@marc2> <002301c3eef2$4bf43de0$945702c3@digo> <17e101c3ef4a$8389f260$0303a8c0@marc2> Message-ID: <000101c408d2$ceebc9d0$3f4d02c3@digo> Hello, I suggest protocol as follows. ;;; Autoloading fonts on demand (defgeneric require-font (name type &key encoding verbose errorp &allow-other-keys)) (defmethod require-font (name (type (eql :type1)) &key (encoding *default-encoding*) (afm name) (pfb afm) verbose (errorp t)) (setf name (string-downcase name)) (or (gethash (list name (get-encoding encoding)) *font-cache*) (loop for font-dir in *afm-files-directories* for afm-truename = (probe-file (make-pathname :name afm :type "afm" :defaults font-dir)) when afm-truename do (when verbose (format t "~&; Loading font ~s on demand..." name)) (load-t1-font afm-truename (probe-file (make-pathname :name pfb :type "pfb" :defaults font-dir))) (return (make-instance 'font :name name :encoding encoding))) (if errorp (error "Font ~s not found." name) nil))) To really benefit, this fragment should be accompanied by removing the following from font.lisp: ;(eval-when (:load-toplevel :execute) ; (load-fonts)) and dropping (pdf:get-font) from the following in cl-typesetting/specials.lisp: ;(defvar *default-font* (pdf:get-font)) ; DI: Unavailable while loading module on demand (defvar *default-font* nil) -- Sincerely, Dmitri Ivanov lisp.ystok.ru From marc.battyani at fractalconcept.com Sat Mar 13 23:32:15 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 14 Mar 2004 00:32:15 +0100 Subject: [cl-pdf-devel] Font loading on demand References: <08e801c3e6b7$e9f50b20$0303a8c0@marc2><08aa01c3eb11$a75d0b10$0303a8c0@marc2><001001c3ebcb$c439da00$6e4302c3@digo><0e5f01c3ebf2$f5607c20$0303a8c0@marc2><000d01c3ecc3$8ecddda0$da5702c3@digo><136c01c3ecc6$6655e1d0$0303a8c0@marc2><002301c3eef2$4bf43de0$945702c3@digo><17e101c3ef4a$8389f260$0303a8c0@marc2> <000101c408d2$ceebc9d0$3f4d02c3@digo> Message-ID: <026001c40953$6bd89c70$0a04a8c0@marc2> From: "Dmitri Ivanov" writes: > I suggest protocol as follows. > > ;;; Autoloading fonts on demand > (defgeneric require-font (name type &key encoding verbose errorp > &allow-other-keys)) > > (defmethod require-font (name (type (eql :type1)) &key (encoding > *default-encoding*) > (afm name) (pfb afm) > verbose (errorp t)) > (setf name (string-downcase name)) > (or (gethash (list name (get-encoding encoding)) *font-cache*) > (loop for font-dir in *afm-files-directories* > for afm-truename = (probe-file (make-pathname :name afm :type > "afm" > :defaults > font-dir)) > when afm-truename > do (when verbose (format t "~&; Loading font ~s on demand..." > name)) > (load-t1-font afm-truename > (probe-file (make-pathname :name pfb :type > "pfb" > :defaults > font-dir))) > (return (make-instance 'font :name name :encoding > encoding))) > (if errorp > (error "Font ~s not found." name) > nil))) > > To really benefit, this fragment should be accompanied by removing the > following from font.lisp: > > ;(eval-when (:load-toplevel :execute) > ; (load-fonts)) Well, in fact load-fonts does not load the fonts. ;-) I shoud rename it to load-std-pdf-fonts-afm as it only loads the AFM files for the 14 predefined pdf fonts. But I will insert this into load-t1-font and change a few names... > and dropping (pdf:get-font) from the following in > cl-typesetting/specials.lisp: > > ;(defvar *default-font* (pdf:get-font)) ; DI: Unavailable while loading > module on demand > (defvar *default-font* nil) You need a default font otherwise you will be forced to specify the font by a style construct Marc From divanov at aha.ru Mon Mar 15 06:11:33 2004 From: divanov at aha.ru (Dmitri Ivanov) Date: Mon, 15 Mar 2004 09:11:33 +0300 Subject: [cl-pdf-devel] Font loading on demand References: <08e801c3e6b7$e9f50b20$0303a8c0@marc2><08aa01c3eb11$a75d0b10$0303a8c0@marc2><001001c3ebcb$c439da00$6e4302c3@digo><0e5f01c3ebf2$f5607c20$0303a8c0@marc2><000d01c3ecc3$8ecddda0$da5702c3@digo><136c01c3ecc6$6655e1d0$0303a8c0@marc2><002301c3eef2$4bf43de0$945702c3@digo><17e101c3ef4a$8389f260$0303a8c0@marc2> <000101c408d2$ceebc9d0$3f4d02c3@digo> <026001c40953$6bd89c70$0a04a8c0@marc2> Message-ID: <000c01c40a55$2cd549d0$495702c3@digo> Hello Marc, |> and dropping (pdf:get-font) from the following in |> cl-typesetting/specials.lisp: |> |> ;(defvar *default-font* (pdf:get-font)) ; DI: Unavailable while |> loading module on demand (defvar *default-font* nil) | | You need a default font otherwise you will be forced to specify the | font by a style construct I always have to because I use Cyrillic :-) So I prefer having a default font name to having the default font. -- Sincerely, Dmitri Ivanov lisp.ystok.ru