Detecting Text Zoom Events

S

stef

Hello:

I am trying to design a web page whose graphics content would change
according to the "text Zoom" settings of the user. (Basically the goal
is to use mathematical symbols that automatically resize in response to
zoom events).

Is it possible to detect a zoom change event?

Stefan
 
L

Lasse Reichstein Nielsen

stef said:
I am trying to design a web page whose graphics content would change
according to the "text Zoom" settings of the user.

My browser doesn't have a "text zoom" setting. I assume you refer to the
one in IE.
(Basically the goal is to use mathematical symbols that
automatically resize in response to zoom events).

Is it possible to detect a zoom change event?

No.

What you could do is to give the image size in em's:
<img src="Delta.png" style="height:1em;">
Then changing the font size should also change the image size.

That is, use CSS, not Javascript for it. It is a presentational
aspect, so CSS is the appropriate tool.

/L
 
D

DU

Lasse said:
My browser doesn't have a "text zoom" setting. I assume you refer to the
one in IE.




No.

What you could do is to give the image size in em's:
<img src="Delta.png" style="height:1em;">
Then changing the font size should also change the image size.

That is, use CSS, not Javascript for it. It is a presentational
aspect, so CSS is the appropriate tool.

/L


Another more simple and more reliable way to work around this issue is
to use Unicode math symbols. If the text size is increased, then the
math symbols will increase too.

Math operators : 2200 to 22FF
Misc. math symbols A: 27D0 to 27FF
Misc. math symbols B: 2980 to 2AFF
etc..

Text is always better than using images of text for many reasons:
interoperability (copy and paste, enlarge text, style text with any css
property, translate text with browser functionalities, etc.), size is
usually 1000% smaller than image, each image require a single, unique
http connection for download, etc.

The only issue remaining is verify browser support for thes math symbols.

DU
 
S

stef

Actually, I use Mozilla, which also has one in the "view" menu. I do
believe one can enlarge the text in all browsers.
Another more simple and more reliable way to work around this issue is
to use Unicode math symbols. If the text size is increased, then the
math symbols will increase too.

Math operators : 2200 to 22FF
Misc. math symbols A: 27D0 to 27FF
Misc. math symbols B: 2980 to 2AFF
etc..

Text is always better than using images of text for many reasons:
interoperability (copy and paste, enlarge text, style text with any css
property, translate text with browser functionalities, etc.), size is
usually 1000% smaller than image, each image require a single, unique
http connection for download, etc.

The only issue remaining is verify browser support for thes math symbols.

DU



Thank you so much for your prompt reponse and suggestions. They
certainly give me a lot to work with! What I plan to do is update an old
project that encoded math in html using gifs and tables:

http://www.ohaganbooks.com/ThirdEdSite/equation/codeindex.html

Hopefully the new incarnation will be more up to date and responsive to
changing the view.
 
L

Lasse Reichstein Nielsen

stef said:
Actually, I use Mozilla, which also has one in the "view" menu. I do
believe one can enlarge the text in all browsers.

Quite an assumption. Even WebTV or mobile phone browsers?
Incidentally, Opera has no "text zoom". It zooms the entire page,
text, images and all, when it zooms :)

Apart from that, I agree that using proper Unicode glyphs is better than
images, if possible. :)

Good luck.
/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top