increasing font size of main window

23 views
Skip to first unread message

ko

unread,
May 1, 2011, 5:55:20 PM5/1/11
to guess-discuss
Is it possible to change the default font size of the main Guess
window? (I.e. the menu bar, etc.) It looks like the font is size 10,
which I find too small. Thanks.

Kostas

Eytan Adar

unread,
May 1, 2011, 10:29:18 PM5/1/11
to guess-...@googlegroups.com
--fontsize option on the command line

-E


--
You received this message because you are subscribed to the Google Groups "guess-discuss" group.
To post to this group, send email to guess-...@googlegroups.com.
To unsubscribe from this group, send email to guess-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/guess-discuss?hl=en.


ko

unread,
May 1, 2011, 10:55:16 PM5/1/11
to guess-discuss
I know about that. But it does not affect the menu bar, info window,
etc. It seems to only affect the size of the text in the console
window. (This is Guess 1.0.4).

On May 1, 10:29 pm, Eytan Adar <eytana...@gmail.com> wrote:
> --fontsize option on the command line
>
> -E
>

Eytan Adar

unread,
May 1, 2011, 11:09:30 PM5/1/11
to guess-...@googlegroups.com
not so easily... you can do it in a very hackish way using the interpreter  (basically grabbing the objects you want and changing the font) or modifying the java and recompiling.

Sorry, wish there was an easier way.

-Eytan

ko

unread,
May 2, 2011, 9:04:19 AM5/2/11
to guess-discuss
So how would you do it using the interpreter? If I type

v.font

in the console, I get

javax.swing.plaf.FontUIResource[family=Dialog,name=Dialog,style=plain,size=12]

Can I change that, somehow? (I assume "v" is the right object here).

On May 1, 11:09 pm, Eytan Adar <eytana...@gmail.com> wrote:
> not so easily... you can do it in a very hackish way using the interpreter
> (basically grabbing the objects you want and changing the font) or modifying
> the java and recompiling.
>
> Sorry, wish there was an easier way.
>
> -Eytan
>

Eytan Adar

unread,
May 2, 2011, 10:21:52 AM5/2/11
to guess-...@googlegroups.com
def fixFont(_c,_f):
_c.setFont(_f)
for _m in _c.getComponents():
if (isinstance(_m,Container)):
fixFont(_m,_f)
else:
_m.setFont(_f)

and then to fix the information window and make it 20 point arial:

fixFont(InfoWindow.getInfoWindow(),Font("Arial",0,20))

or the top menu bar:

fixFont(ui,Font("Arial",0,20)

or the internal menu bars:

for menu in ui.getGMenuBar().getSubElements():
  for subm in menu.getSubElements():
  fixFont(subm.getComponent(),Font("Arial",0,20))

and so on...

did I mention it's a hack?

-Eytan

ko

unread,
May 2, 2011, 11:43:02 AM5/2/11
to guess-discuss
Wonderful, this makes a big difference. Hack or no hack :-)
Also, fixing the top menu bar seems to fix the info window as well.

On May 2, 10:21 am, Eytan Adar <eytana...@gmail.com> wrote:

Reply all
Reply to author
Forward
0 new messages