Bug 109469 - Font size increments often have no effect
Summary: Font size increments often have no effect
Status: RESOLVED INTENTIONAL
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-22 15:23 UTC by Nicolas Brisset
Modified: 2005-08-23 11:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2005-07-22 15:23:28 UTC
Version:           1.2.0_devel (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

When making increments in the font size spinboxes ("Appearance" tab in the plot dialog), the corresponding labels do not always change. This is especially true with my XP+Cygwin/XFree 86 on Solaris setup, where I typically need to change the numbers from 0 to 5 to 10 to see something change (values in between do not have any effect).

I understand that kst does not work directly with point sizes as in word processors for example. This value rather seems to be a relative size, but I've never been able to figure out what the number exactly represents.

I don't know whether that bug really needs to be fixed (typically bug #109467 would allow us to live without resolving this one) but even on Linux, I find it disturbing when I change sizes and nothing happens. This is probably linked with font substitutions or other platform-dependent issues, maybe not so trivial to fix. 

One solution (I have no idea whether it is technically feasible) might be to compute the next value that really results in a visible change, and set it automatically. To illustrate this better, imagine the sequence:
1) the user creates plots and curves, and finds Y axis labels to be too small
2) the plot dialog is called, "Appearance" tab
3) font size for y axis is "0", he/she clicks on the spinbox
4) kst computes the resulting label size, and if it is still the same as with "0" automatically increments it again. This can be repeated until the resulting value really brings a change. It might be "5", or "10", at least the user needs just one click to increment size by one "step".

A better solution would of course be to let the requested sizes increment with a step of 1, but compute internally the right font size to use so that the labels are actually drawn bigger.
Comment 1 Andrew Walker 2005-07-22 22:34:36 UTC
The reason it works as it does is so that when the plots are resized a sensible label size is calculated in all situations.

Imagine a plot (essentially the size of the display) where the user has selected a size of 12 for the x-label in the plot dialog. If you want the label to retain its size relative to the plot size then you must scale the label size to the plot size.

When the plot is large incrementing the label size by 1 will roughly increment the  font size by 1. When the plot is small the font size will increase more slowly.

I don't think there's any other way to do this that retains the scaling. Unfortunately this means that incrementing the label size doesn't always increment the font size.
Comment 2 Nicolas Brisset 2005-08-23 11:15:03 UTC
I understand the scaling problem and the need for a relative size, but would it be possible to implement my suggestion above: compute automatically the next value that results in a visible change and set the spinbox value accordingly ?