[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (font-height)



>no, I have no idea without knowing how you implemented your
>dialog items and font-height. Is this the case of the
>missing library again?
Nope.  Font-height IS defined as you give it below.

>I tried it, replacing *my-static-text-dialog-item* with
>*static-text-dialog-item*:
> 
>(defobfun (exist *my-dialog*) (init-list)
>  (usual-exist init-list)
>  (add-dialog-items
>    (oneof *static-text-dialog-item*
>      :dialog-item-nick-name 'text
>      :dialog-item-position #@(4 40)
>    )
>  )
>  (ask-named-item 'text (print (font-height)))
>)
>
>and defining font-height as:
>
>(defobfun (font-height *dialog-item*) ()
>     (multiple-value-bind (ascent descent widmax leading)
>                          (font-info (dialog-item-font))
>(+ ascent descent leading)))
>
>and get the expected value of 16.
>
>Mark
>
>chung@ils.nwu.edu

Yes, that is how I've defined font-height.  Font-height generally works. 
If I call the same function in on that dialog-item AFTER the window is
built and displayed, I get 16 also.  It has something to do with the
building of the window.  It's TERec isn't being set up until AFTER my exist
(not the usual) one returns.  Also I have specified a font-size of 10 (or
maybe 9?) somewhere up in the hierarchy.  *my-dialog* is actually about 3
layers below *dialog*, so I actually expect 12.  For the time being, I have
just put 12 in there, but it's pretty ugly.

"TANSTAAFL" Rich lynch@aristotle.ils.nwu.edu