How to change the font of Panel Title?

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE

How to change the font of Panel Title?

Postby sakamitz » Sat Feb 25, 2017 3:18 pm

How can I set the font of the marked text?

Image
sakamitz
 
Posts: 1
Joined: Sat Feb 25, 2017 3:09 pm

Re: How to change the font of Panel Title?

Postby oofoe » Sat Mar 18, 2017 2:33 pm

Can you post source for this GUI display? Not even sure how you're displaying it since NewLisp GUIServer doesn't seem to support the AWT Group widget.

If you're just dropping text over a hand drawn group, you can do it using the gs:set-font function.
Testing can show the presence of bugs, but not their absence.
oofoe
 
Posts: 60
Joined: Wed Sep 28, 2005 7:13 pm

Re: How to change the font of Panel Title?

Postby oofoe » Sat Mar 18, 2017 2:43 pm

OK, see that you're using gs:set-titled-border -- I haven't used that one myself.

Does seem that gs:-set-font won't work for that through the GUIServer.

However, the SWT (successor to AWT which is used by GUIServer, I think) will allow to set a font with the .setFont() method. Perhaps AWT has the same capability and it's just not wired up in the GUIServer. So, if you're comfortable with Java you could get the GUIServer code, find the set-titled-border handler and see if you can change it there, then recompile. See here for possible example: http://stackoverflow.com/questions/7117408/change-group-widget-title-color-in-swt#7118384

Otherwise, make your window a canvas instead and place the widgets and draw the border yourself and label it with the font you prefer.

Another possibility: That looks like a system default font. If you're running in Linux maybe you don't have the "icon" font used for labelling those things installed? I can't remember what the font is, but that would be worth investigating, especially if you see other applications on your system with the same problem.

Good luck!
Testing can show the presence of bugs, but not their absence.
oofoe
 
Posts: 60
Joined: Wed Sep 28, 2005 7:13 pm


Return to newLISP Graphics & Sound

Who is online

Users browsing this forum: No registered users and 3 guests

cron