Page 1 of 2
Font in LXPANEL too big
Posted: Sat Mar 13, 2010 10:18 am
by canci
Hi everyone! First of all, great compliments to this DE! It's the best out there at the moment!
Very snappy and responsive!
I have all my fonts changed to 7pt Sans, but the Lxpanel font is just too big and doesn't change.
I haven't seen an option anywhere, not in the wiki and not on this forum. Can any1 help me?
If it's not available at the moment, please tell me so I can report a wishlist in the Debian bug tracker.
Thank you all for your work and time!
EDIT: Also, if you consider introducing font sizes, it'd be cool if the clock font type and size could be set separately.
EDIT: Forgot the screenshot:

Re: Font in LXPANEL too big
Posted: Sat Mar 13, 2010 10:36 am
by Marty Jack
At the moment, the font scales with the icon size set in Panel Preferences/Geometry. Let me think about this a little and see if there is a way to take better account of the theme's font size in this calculation.
One of the ways of remaining lightweight is not to have too many options.
Re: Font in LXPANEL too big
Posted: Sun Mar 14, 2010 4:19 pm
by phillipe
I don't know if you know how to compile the programs on your distro.
But I use the below command to patch the lxpanel ( panel.c ) source code.
With that, the fonts don't get bigger until you determine a value above of 36px.
Code: Select all
sed 's/p->icon_size < 26/p->icon_size <= 36/' -i src/panel.c
Re: Font in LXPANEL too big
Posted: Sun Mar 14, 2010 6:46 pm
by Marty Jack
I am starting to have misgivings about when we introduced font scaling before 0.5.0. This was shortly after we introduced the icon size control. The feedback was that if you turned the icon size up, the text size looked strange. My thinking was that if you turned the icon size up because you don't see well, you want the text to be bigger. But, it would be reasonable that you would then change the font size in your theme to be bigger, so all your text would be readable.
The other factor, of course, is that if you crush your panel down to 16 pixels, you want smaller text so it still fits in the panel.
Please help me understand what the right behavior is.
Re: Font in LXPANEL too big
Posted: Sun Mar 14, 2010 9:24 pm
by canci
Thank you all for your replies! I will definitely patch the panel, seems like a trivial thing.
As for the option, what about you test the supplied patch for 1 version and see if ppl complain?
I mean, it will still scale after 36px.
I knew the scaling wasn't there before!

For a moment there I thought I was going crazy...
Thank you so much!
Re: Font in LXPANEL too big
Posted: Mon Mar 15, 2010 11:04 am
by zebbeman
Hi,
I am having the same problem. On three computers I have 3 behaviors, where one is perfect; one is way too big; and one too small. It would be great to have a font size setting exclusively for the panel.
Part from that, great panel!
Re: Font in LXPANEL too big
Posted: Mon Mar 15, 2010 2:49 pm
by canci
@phillipe: Thanks for your workaround, but it didn't help. Then I looked at panel.c and found out why. Here's the default one:
Code: Select all
/* Compute an appropriate size so the font will scale with the panel's icon size. */
int font_desc;
if (p->icon_size < 20)
font_desc = 9;
else if (p->icon_size >= 20 && p->icon_size < 26)
font_desc = 10;
else
font_desc = 12;
As you can see, the minimum font size was too big, so I've changed them to these values:
Code: Select all
/* Compute an appropriate size so the font will scale with the panel's icon size. */
int font_desc;
if (p->icon_size < 20)
font_desc = 7;
else if (p->icon_size >= 20 && p->icon_size < 26)
font_desc = 8;
else
font_desc = 12;
This way it will still resize, but be more compatible with desktops with smaller fonts.
Wow, I just did C... I feel soooooooo l33t now!
Screenshot:

Re: Font in LXPANEL too big
Posted: Mon Mar 15, 2010 4:27 pm
by phillipe
Very nice canci!
The configuration that I posted is perfect for me.
But It's good to see that you made your own patch.

Re: Font in LXPANEL too big
Posted: Sat Mar 20, 2010 1:00 pm
by rockdoctor
Marty Jack wrote:I am starting to have misgivings about when we introduced font scaling before 0.5.0. This was shortly after we introduced the icon size control. The feedback was that if you turned the icon size up, the text size looked strange. My thinking was that if you turned the icon size up because you don't see well, you want the text to be bigger. But, it would be reasonable that you would then change the font size in your theme to be bigger, so all your text would be readable.
The other factor, of course, is that if you crush your panel down to 16 pixels, you want smaller text so it still fits in the panel.
Please help me understand what the right behavior is.
My vote is for an optional
fontsize parameter in the lxpanel config file; if no fontsize parameter is present, default as is presently done.
Looking at the code in lxpanel-0.5.5-2.fc13.src.rpm, it appears that this will require:
1. modification of the Panel structure (panel.h) to accommodate the new parameter
2. some code to read fontsize (
panel_parse_global() in panel.c)
3. modification of the code that currently sets font_desc (
panel_draw_label_text() in panel.c) to bypass this code block if fontsize is explicitly given.
Re: Font in LXPANEL too big
Posted: Wed Apr 07, 2010 1:59 am
by Marty Jack
I have decided to go with the independent font size control. It does add an additional option, but I think it gives everyone a way to be happy. The default will be 10 pt. Thank you all for your opinions.
I have this working, but I cannot promise when it will come out. Because we have lots of language translations, we have to batch up new features that add strings to the user interface.