0

ingeva,

i really liked what you did with your javascript for auto-resizing the font. it inspired to create an experiment to observe how line length varied with font size so that i could determine an equation that would keep the characters on each line the same as the window size changed.

for Chrome and Safari (i haven't tried others) the equation is here:

(font size) = ((line width) - 6.3799) / 25.407

so if you changed your javascript code to:

P =  Math.floor ((W - 6.3799) / 25.407);

from:

P =  Math.floor (Factor*(8+W/65));

you would experience an even smoother change in font size.

here's a link to my jquery code for resizing: http://www.landlessness.net/2010/08/jquery-auto-resize-fonts.html

and the html/jquery i used to run the experiments: http://www.landlessness.net/2010/08/font-size-versus-line-length_09.html

Edited by landlessness: remove html formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.