When you increase the font size, it increases by multiplying the pixel size by 1.2.
When you decrease the font size, it decreases by multiplying the pixel size by 0.8.
These two are not uniform. If you increase the font size once, then decrease it once, you do not get your original font size. That is, n * 1.2 * 0.8 does not equal n.
Example: if you are starting with a font size of 14 pixels:
Increase: 14 * 1.2 = 16.8
Decrease: 16.8 * 0.8 = 13.44, which is NOT the original font size of 14.

Solution: on decrease, divide by 1.2. This results in a uniform increase/decrease, i.e. n * 1.2 / 1.2 = n.

I've attached a patch that does this.

CommentFileSizeAuthor
text_resize_font_decrease.patch733 bytespaulmckibben

Comments

attheshow’s picture

Assigned: Unassigned » attheshow
Status: Needs review » Fixed

Thanks for the patch. Great points! Just committed patch in dev versions of both 6.x and 7.x. Please test and let me know if you find issues.

Status: Fixed » Closed (fixed)

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