public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* A font size patch for large screens.
@ 1999-08-11  2:18 Moses DeJong
  1999-08-11 10:36 ` James Ingham
  0 siblings, 1 reply; 5+ messages in thread
From: Moses DeJong @ 1999-08-11  2:18 UTC (permalink / raw)
  To: insight

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* A font size patch for large screens.
  1999-08-11  2:18 A font size patch for large screens Moses DeJong
@ 1999-08-11 10:36 ` James Ingham
  1999-08-11 11:27   ` Moses DeJong
  0 siblings, 1 reply; 5+ messages in thread
From: James Ingham @ 1999-08-11 10:36 UTC (permalink / raw)
  To: Moses DeJong; +Cc: insight

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.
 > 
 > 
 > 
 > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A font size patch for large screens.
  1999-08-11 10:36 ` James Ingham
@ 1999-08-11 11:27   ` Moses DeJong
  1999-08-11 11:55     ` James Ingham
  1999-08-11 11:56     ` James Ingham
  0 siblings, 2 replies; 5+ messages in thread
From: Moses DeJong @ 1999-08-11 11:27 UTC (permalink / raw)
  To: James Ingham; +Cc: insight

On Wed, 11 Aug 1999, James Ingham wrote:

> Moses,

A buddy of mine has a PowerBook, those are sweet machines. Only problem
is they get to hot for my lap (yee-ouch).
 
> Ooh...  You have a nice laptop!  Mine can only do 1024x768 (though it
> is a PowerBook, so it's ravishingly beautiful...)

Yeah, font sizes are always a pain. A size of 16 looks great on my
Linux box but is it flat out wrong on other systems. As long as
the default is "close", thats all I care about. The current default
of 9 is unreadable on my system.

> 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.

Change away. I would love to test out any new algo.

later
mo

> 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
>  > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A font size patch for large screens.
  1999-08-11 11:27   ` Moses DeJong
@ 1999-08-11 11:55     ` James Ingham
  1999-08-11 11:56     ` James Ingham
  1 sibling, 0 replies; 5+ messages in thread
From: James Ingham @ 1999-08-11 11:55 UTC (permalink / raw)
  To: Moses DeJong; +Cc: James Ingham, insight

Moses,

 > 
 > A buddy of mine has a PowerBook, those are sweet machines. Only problem
 > is they get to hot for my lap (yee-ouch).

Yeah, this was true for a while.  They did something slick in the OS
going from 8.5 to 8.6 to reduce power consumption and temperature.
The PowerBook running MacOS 8.6 is pretty comfortable, though it was a 
bit toasty under 8.5.  If you are running LinuxPPC, you had better
just put it on a table...

The newer Bronze ones are supposedly lots cooler.

 > 
 > Yeah, font sizes are always a pain. A size of 16 looks great on my
 > Linux box but is it flat out wrong on other systems. As long as
 > the default is "close", thats all I care about. The current default
 > of 9 is unreadable on my system.
 > 
 > > 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.
 > 
 > Change away. I would love to test out any new algo.
 > 

Okay, I'll fool around with this when I get half a mo', I am pretty
busy right now.

Jim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A font size patch for large screens.
  1999-08-11 11:27   ` Moses DeJong
  1999-08-11 11:55     ` James Ingham
@ 1999-08-11 11:56     ` James Ingham
  1 sibling, 0 replies; 5+ messages in thread
From: James Ingham @ 1999-08-11 11:56 UTC (permalink / raw)
  To: Moses DeJong; +Cc: James Ingham, insight

Moses,

 > 
 > A buddy of mine has a PowerBook, those are sweet machines. Only problem
 > is they get to hot for my lap (yee-ouch).

Yeah, this was true for a while.  They did something slick in the OS
going from 8.5 to 8.6 to reduce power consumption and temperature.
The PowerBook running MacOS 8.6 is pretty comfortable, though it was a 
bit toasty under 8.5.  Got about 30 minutes longer on the battery too
- go figure...  Of course, if you are running LinuxPPC, you had better
just put it on a table...

The newer Bronze ones are supposedly lots cooler.

 > 
 > Yeah, font sizes are always a pain. A size of 16 looks great on my
 > Linux box but is it flat out wrong on other systems. As long as
 > the default is "close", thats all I care about. The current default
 > of 9 is unreadable on my system.
 > 
 > > 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.
 > 
 > Change away. I would love to test out any new algo.
 > 

Okay, I'll fool around with this when I get half a mo', I am pretty
busy right now.

Jim

-- 
++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
Jim Ingham                                              jingham@cygnus.com
Cygnus Solutions Inc.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-08-11 11:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-11  2:18 A font size patch for large screens Moses DeJong
1999-08-11 10:36 ` James Ingham
1999-08-11 11:27   ` Moses DeJong
1999-08-11 11:55     ` James Ingham
1999-08-11 11:56     ` James Ingham

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).