In the administration menu, I've set the parameters to limit the font size between 12 and 24 pixels. No line height adjustment. Using Firefox 3.0.5 on Windows XP, increasing and decreasing works. Except the smallest font size it will go to (as confirmed in Firebug) is 13.52 pixels.

Looking at the code, you're increasing by a factor of 1.2 times the default until you hit the maximum specified font size. And you use 0.8 to decrease it. Instead of using factors and decimals, maybe just increase in even whole number steps based on the distance between minimum and maximum? This way you don't get any fractional font sizes and it will always be able to return to the lower end of the scale instead of being stuck a fraction above it.

Comments

attheshow’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Assigned: Unassigned » attheshow
Status: Active » Fixed

Fixed the primary bug here in the 1.x-dev version. Thanks for pointing it out! Please let me know if this change works to get you back to the lowest font size that you've specified.

Regarding the other issue, at this time I don't see a clear need to switch to whole number increments. Partially because this is fairly complicated when some users are using ems for font size and some are using pixels for font sizes. I think it's more logical to just increase/decrease the current font size by 20%, which seems to be fairly acceptable to most users.

gbrussel’s picture

Thanks. This fix seems to have worked. Maybe you might consider the same method on the upper boundary as well? You're doing great work.

attheshow’s picture

Good idea. I've just implemented that suggestion into the dev version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.