A
ara.t.howard
hi all-
i'm a totally js hack so go easy on me...
i'd like to create a function that, given the size of a block of text
in
x = maximum number of chars
y = total number of lines (this is in chars too of course)
could determine and set the font size to be close, say 90 percent, to
the maximum that will display in the users browser without scrolling.
if you know what lightning slides are you'll understand what i'm
doing.
for example, given
foo
bar
foobar
x = 6
y = 3
i am trying to set the font size such that this text would __just__
fit onto the screen without scrolling in horizontal or vertical
directions.
i've got some code that's close, but i'm hoping someone here might
have a more elegant way.
kind regards
-a
i'm a totally js hack so go easy on me...
i'd like to create a function that, given the size of a block of text
in
x = maximum number of chars
y = total number of lines (this is in chars too of course)
could determine and set the font size to be close, say 90 percent, to
the maximum that will display in the users browser without scrolling.
if you know what lightning slides are you'll understand what i'm
doing.
for example, given
foo
bar
foobar
x = 6
y = 3
i am trying to set the font size such that this text would __just__
fit onto the screen without scrolling in horizontal or vertical
directions.
i've got some code that's close, but i'm hoping someone here might
have a more elegant way.
kind regards
-a