469,929 Members | 1,883 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

Detecting Text Zoom Events

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
Jul 20 '05 #1
4 6326
stef <st******@optonline.net> writes:
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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
DU
Lasse Reichstein Nielsen wrote:
stef <st******@optonline.net> writes:

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

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
Jul 20 '05 #3
In article <c1**********@news.eusc.inter.net>,
DU <dr*******@hotWIPETHISmail.com> wrote:
Lasse Reichstein Nielsen wrote:
stef <st******@optonline.net> writes:

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.
Actually, I use Mozilla, which also has one in the "view" menu. I do
believe one can enlarge the text in all browsers.

(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

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/ThirdEdSi...codeindex.html

Hopefully the new incarnation will be more up to date and responsive to
changing the view.
Jul 20 '05 #4
stef <st******@optonline.net> writes:
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
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Suresh Kumaran | last post: by
reply views Thread by AndyDunning | last post: by
10 posts views Thread by Patty O'Dors | last post: by
1 post views Thread by dana lees | last post: by
1 post views Thread by jhcruz | last post: by
1 post views Thread by sajitk | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.