Lisp HUG Maillist Archive

specifying fonts in menus

Hi all,  I'm using some non-ASCII characters in an application, and
having a fine time with Lucida Sans Unicode on OS X and Windows in
capi:output-panes and capi:option-panes.  I've got some menus, though,
that I'm displaying with capi:display-popup-menu that needs the same
font, and I can't seem to find out what relevant object will accept a
:FONT keyword argument.  I imagine that there's a way to do this;
anyone know what it is?  Thanks in advance!

//JT

-- 
=====================
Joshua Taylor
tayloj@cs.rpi.edu, jtaylor@alum.rpi.edu

"A lot of good things went down one time,
  back in the goodle days."
    John Hartford


Re: specifying fonts in menus

On Wed, Nov 4, 2009 at 3:06 PM, Joshua TAYLOR <tayloj@cs.rpi.edu> wrote:
> Hi all,  I'm using some non-ASCII characters in an application, and
> having a fine time with Lucida Sans Unicode on OS X and Windows in
> capi:output-panes and capi:option-panes.  I've got some menus, though,
> that I'm displaying with capi:display-popup-menu that needs the same
> font, and I can't seem to find out what relevant object will accept a
> :FONT keyword argument.  I imagine that there's a way to do this;
> anyone know what it is?  Thanks in advance!
>
> //JT

I don't have a solution yet, but digging through some of the CAPI
examples, I may have made some progress.  in the
examples/capi/elements/popup-menu-button.lisp file, adding

    :font (gp:make-font-description :family "Times New Roman")

to the initargs for the fixed-popup-menu-button causes the appropriate
button and its menu's items to be displayed in Times New Roman.  This
seems to be a start.  Some inspecting shows this initarg stored in the
button in capi::initargs-for-implementation, a slot inherited from
capi::pane-with-implementation, which has capi:simple-pane as a
superclass, and capi:simple-pane accepts a :font argument.

Any thoughts?

Thanks in advance,
//JT

-- 
=====================
Joshua Taylor
tayloj@cs.rpi.edu, jtaylor@alum.rpi.edu

"A lot of good things went down one time,
  back in the goodle days."
    John Hartford


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