Ethereal-dev: Re: [Ethereal-dev] Zooming weirdness

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sat, 22 May 2004 19:17:09 -0700
On Sat, May 22, 2004 at 04:42:11PM +0200, Gisle Vanem wrote:
> If for some reason the "gui.zoom_level" in my recent file becomes
> less than approx -19 and I restart ethereal, the action on the "Zoom-in" 
> and "Zoom-out" buttons gets reversed !?  I.e. pressing "zoom-out" 
> magnifies the font and vice versa.
> 
> Not sure why since I don't see any msg-box caused by
> font_apply() returning FA_FONT_NOT_AVAILABLE. But I cannot
> see any code preventing the font-size becoming negative. 
> E.g. what will GTK2+ do if main.c selects
> "lucida console -5"

Well, with GTK+ 2.2.4 on OS X 10.3.2, if I set the font to "lucida
console -5", I get some GTK+ warnings:

** (lt-ethereal:11916): WARNING **: Couldn't load font "lucida console
-4.9990234375" falling back to "Sans -4.9990234375"

** (lt-ethereal:11916): WARNING **: Couldn't load font "Sans
-4.9990234375" falling back to "Sans -4.9990234375"

** (lt-ethereal:11916): WARNING **: All font failbacks failed!!!!

and Ethereal exits.

I don't know whether we can arrange to fall back on some built-in font
if "all font fallbacks [fail]", but that might be useful.

We should probably also try to clamp "recent.gui_zoom_level" so that
it's < the font size in the font name, i.e. if the font is as small as
it can be, disable the "zoom out" toolbar button.