From: James Ingham <jingham@cygnus.com>
To: Moses DeJong <dejong@cs.umn.edu>
Cc: insight@sourceware.cygnus.com
Subject: A font size patch for large screens.
Date: Wed, 11 Aug 1999 10:36:00 -0000 [thread overview]
Message-ID: <14257.46328.983786.8613@leda.cygnus.com> (raw)
In-Reply-To: <Pine.GSO.4.05.9908110416350.22063-100000@brin.cs.umn.edu>
Moses,
Ooh... You have a nice laptop! Mine can only do 1024x768 (though it
is a PowerBook, so it's ravishingly beautiful...)
Thanks for the patch. The idea is great, but I don't think the
algorithm is quite right, however. I think the laptop case is an
extreme example of many pixels + small physical size. I have a Sun
display at 1280x1024, and 16 is way too big a font for the default.
14 is okay, though a bit on the biggish side, 11 is really pretty
good, though 9 is definately too small.
We should be able to play around with some heuristics involving both
"winfo screenwidth" and "winfo screenmmwidth" to get a better choice.
What do you think?
Jim
> Hi all.
>
> I just downloaded and debugged my first program with insight. It looks
> great, but the default font is much too small on my 1280x1000 laptop screen.
> I have included a patch that adjusts the default font size based on the
> height of the screen and adjust the range of the font size select widget.
>
>
> Mo DeJong
> dejong@cs.umn.edu
>
>
>
>
>
>
> 1999-08-11 Mo DeJong <dejong@cs.umn.edu>
>
> * gdb/gdbtcl2/globalpref.itb
> libgui/library/looknfeel.tcl : Use the screen height to determine
> the default font size. Adjust font selection widget range as well.
>
>
>
> --- insight-19990809/gdb/gdbtcl2/globalpref.itb Sat Jul 17 00:32:46 1999
> +++ ../insight-19990809/gdb/gdbtcl2/globalpref.itb Wed Aug 11 03:13:14 1999@@ -113,7 +113,7 @@
> $frame.icons.cb configure -width $width
>
>
> - # searching for fixed font families take a long time
> + # searching for fixed font families can take a long time
> # therefore, we cache the font names. The font cache
> # can be saved in the init file. A way should be provided
> # to rescan the font list, without deleting the entry from the
> @@ -242,7 +242,10 @@
> $f.${name}n list insert end $a
> }
>
> - tixControl $f.${name}s -label Size: -integer true -max 18 -min 6 \
> + set fontmin [expr {$Original($name,size) * 2 / 3}]
> + set fontmax [expr {$Original($name,size) * 2}]
> +
> + tixControl $f.${name}s -label Size: -integer true -max $fontmax -min $fontmin \
> -value $Original(${name},size) -command [code $this font_changed size $name]
> [$f.${name}s subwidget entry] configure -width 2
> label $f.${name}l -text ABCDEFabcdef0123456789 -font test-$name-font
> --- insight-19990809/libgui/library/looknfeel.tcl Sat Mar 28 04:08:47 1998+++ ../insight-19990809/libgui/library/looknfeel.tcl Wed Aug 11 03:00:45 1999@@ -34,12 +34,21 @@
> eval define_font global/italic [array get actual]
> define_font global/menu -family windows-menu
> } else {
> - define_font global/default -family courier -size 9
> - define_font global/bold -family courier -size 9 -weight bold
> - define_font global/fixed -family courier -size 9
> - define_font global/status -family courier -size 9
> - define_font global/italic -family courier -size 9 -slant italic
> - define_font global/menu -family courier -size 9
> + set def_size 9
> + set screenheight [winfo screenheight .]
> + # if running on a really big display, increase the default font size
> + if {$screenheight > 1200} {
> + set def_size 20
> + } elseif {$screenheight > 1000} {
> + set def_size 16
> + }
> +
> + define_font global/default -family courier -size $def_size
> + define_font global/bold -family courier -size $def_size -weight bold
> + define_font global/fixed -family courier -size $def_size
> + define_font global/status -family courier -size $def_size
> + define_font global/italic -family courier -size $def_size -slant italic
> + define_font global/menu -family courier -size $def_size
> }
>
> # Make sure this font is actually used by default.
>
>
>
>
next prev parent reply other threads:[~1999-08-11 10:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-11 2:18 Moses DeJong
1999-08-11 10:36 ` James Ingham [this message]
1999-08-11 11:27 ` Moses DeJong
1999-08-11 11:55 ` James Ingham
1999-08-11 11:56 ` James Ingham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14257.46328.983786.8613@leda.cygnus.com \
--to=jingham@cygnus.com \
--cc=dejong@cs.umn.edu \
--cc=insight@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).