C
Cartoper
I am working on a kiosk system. It is packaged software (I am a
ISV). I know my customers are going to be running on a number of
different resolutions and I want the kiosk to have the same
proportional layout. In other words, if at 1024x768 the font takes up
7% of the height, I want it to be 7% when at 1600x1200. I have
learned from a html newsgroup that there is no easy way to do this in
a browser so I am figuring that I will have to do it the hard way, via
JavaScript. Here is what I am assuming the steps are:
* First get the base percentage:
1.1: Find a font that looks good on my monitor
1.2: Somehow find out the height of the font (I know that height is a
relative term depending on the character), which height I should be
using I don't know.
1.3: Find out what percentage of the screen I want the text.
* Set the font size in the web page:
2.1: Determine the screen size/window size .
2.2: Use the percentage from step 1.3 to find out how many pixels on
this screen.
2.3: Somehow set the standard font size to the result of 2.2.
Is this the best way to achieve my goal? If so, how does one code up
step 1.2 and 2.3? I am targeting all the browsers, right now the
kiosk is IE7 but that will be changing to either Firefox or Safari
(WebKit) in the near future. Also in future versions, the system will
be running over a WiFi so that folks can use their personal laptops to
access it. In a perfect world, I would love to see things size as the
user adjusts the size of the browser!
The back end is Apache with both PHP and a custom Apache Module, so I
have lots of flexibility there, too.
Cartoper
ISV). I know my customers are going to be running on a number of
different resolutions and I want the kiosk to have the same
proportional layout. In other words, if at 1024x768 the font takes up
7% of the height, I want it to be 7% when at 1600x1200. I have
learned from a html newsgroup that there is no easy way to do this in
a browser so I am figuring that I will have to do it the hard way, via
JavaScript. Here is what I am assuming the steps are:
* First get the base percentage:
1.1: Find a font that looks good on my monitor
1.2: Somehow find out the height of the font (I know that height is a
relative term depending on the character), which height I should be
using I don't know.
1.3: Find out what percentage of the screen I want the text.
* Set the font size in the web page:
2.1: Determine the screen size/window size .
2.2: Use the percentage from step 1.3 to find out how many pixels on
this screen.
2.3: Somehow set the standard font size to the result of 2.2.
Is this the best way to achieve my goal? If so, how does one code up
step 1.2 and 2.3? I am targeting all the browsers, right now the
kiosk is IE7 but that will be changing to either Firefox or Safari
(WebKit) in the near future. Also in future versions, the system will
be running over a WiFi so that folks can use their personal laptops to
access it. In a perfect world, I would love to see things size as the
user adjusts the size of the browser!
The back end is Apache with both PHP and a custom Apache Module, so I
have lots of flexibility there, too.
Cartoper