[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Fonts at different screen resolution

From: richard terry
Subject: [Gnumed-devel] Fonts at different screen resolution
Date: Sun, 4 Aug 2002 23:01:06 +1000
User-agent: KMail/1.4.1

> > Unfortunately the gui fonts are best at 1024, not 800/600, until Karsten
> > or someone brighter than I does the code to detect the resolution and put
> > in the appropriate size fonts. I tried it at 800*600 and it was big and
> > boxy.
> I am not sure I understand entirely what you mean. Would you
> mind explaining this in a bit more detail so I know what
> to research ?

The problem is as follows. I design at 1024*768 because that's the resolution 
I always have used in Linux.

Check out this statement:

self.list_script = wxListCtrl(self, ID_SCRIPTLIST,  wxDefaultPosition, 
          self.list_script.SetFont(wxFont(12,wxSWISS, wxNORMAL, wxNORMAL, 
false, 'xselfont'))

Here, I have decided visually that on my screen the font size of 12 looks 
appropriate. However if you then view the resultant code by switching your 
monitor resolution to 800*600 (probably more common) then it may need a size 
10, or perhaps an 8.

In Visual Basic a similar problem existed but I handled it as follows:

1) I had an resizing ocx which, as the window size increased or decreases the 
font size was increased or decreased from the pre-set level proportionately.

2)The preset level (ie the one I designed the thing in) could be overidden by 
the user in any point of the screen by an option on the right mouse popup 
menu, shown also in the attatched png. IE whatever 'start at size' the user 
selected and saved the font handler started from in its growing or shrinking 
of the fonts.

As I'm a visual person, I've attatched a png I just made up which shows you 
the problem. This was produced by taking snapshots of the screen a moment ago 
after making the window small and progressively resizing.

Now, there are inherent problems in GTK with this, in that whoever coded it 
has not built in things such as accuracy in the height of lines in say a list 
box, proportionate to the size of the font in the list box, ie the line 
containing the text, does not shrink proportionately in many cases as you 
decrease the font size, but this problem will exist whether or not we have an 
automatic font resizer.

Attachment: fontsallsizes.png
Description: PNG image

reply via email to

[Prev in Thread] Current Thread [Next in Thread]