Lisp HUG Maillist Archive

fonts in capi:editor-pane

Hi,

I'm trying to set the font used in a capi:editor-pane and not having 
much luck.

To show a simple example of what I think should work I've made two 
changes to the editor-pane.lisp example that comes with lispworks:
	1) defined some constant text for the :text parameter
	2) added the :font initarg to the editor-pane

The font is not as specified. I'm working on LW for the mac. Is this a 
problem?

Does anybody know how this is supposed to work?

(I'll detail my problems with delivering this in a message I'll send 
out later.)

Here is the code:

(capi:define-interface editor-pane-test ()
   ()
   (:panes
    (editor-pane
     capi:editor-pane
     :text "just some text to play with"
     :font (gp:make-font-description :family "Courier"
                                     :size 18
                                     :WEIGHT :MEDIUM
                                     :SLANT :ROMAN)
     :echo-area-pane echo-area
     :visible-min-width '(character 80)
     :visible-min-height '(character 15))
    (buttons
     capi:push-button-panel
     :items '("Beginning Of Buffer" "End Of Buffer" "Kill Line" "Undo")
     :callback-type :data
     :selection-callback #'(lambda (command)
                             (capi:call-editor editor-pane command)))
    (echo-area capi:echo-area-pane :max-height t))
   (:default-initargs
    :title "Editor Pane Test"))

(defun test-editor-pane ()
   (capi:display (make-instance 'editor-pane-test)))


----
Bob Hutchison          -- blogs at <http://www.recursive.ca/hutch/>
Recursive Design Inc.  -- <http://www.recursive.ca/>


Re: fonts in capi:editor-pane

On Nov 21, 2004, at 12:42 AM, Bob Hutchison wrote:

> (I'll detail my problems with delivering this in a message I'll send 
> out later.)

It turns out that when delivering at a level of 2 or higher, you have 
to specify          :KEEP-EDITOR t in the delivery options.

Font's still don't work

Cheers,
Bob

----
Bob Hutchison          -- blogs at <http://www.recursive.ca/hutch/>
Recursive Design Inc.  -- <http://www.recursive.ca/>


Re: fonts in capi:editor-pane

Unable to parse email body. Email id is 3047

Re: fonts in capi:editor-pane

On Nov 21, 2004, at 12:42 AM, Bob Hutchison wrote:

>     :font (gp:make-font-description :family "Courier"
>                                     :size 18
>                                     :WEIGHT :MEDIUM
>                                     :SLANT :ROMAN)


Try

     :font (gp:find-best-font (capi:convert-to-screen)
			(gp:make-font-description :family "Courier"
                                     :size 18
                                     :WEIGHT :MEDIUM
                                     :SLANT :ROMAN))

Best,

John DeSoi, Ph.D.

  
  


Updated at: 2020-12-10 08:54 UTC