From: Dr J R Stockton on 6 Jun 2010 13:31 In comp.infosystems.www.authoring.html message <dorayme-F40CCD.092801050 62010(a)news.albasani.net>, Sat, 5 Jun 2010 09:28:01, dorayme <dorayme(a)optusnet.com.au> posted: XP CIWAH, CLJ; FU not set. For CLJ, <FAQENTRY> later. >One of the limitations of images is the fixed size. There are >ways to have the size change with the user font size setting but >it is not great in IE (I am referring to em dimensioning the >image) so I suggest you consider The following web page source shows, in Chrome 5.0, conventional text characters (ABC DEF) on each side of an equation "X = - root Y", where both the text and the equation scale together with Ctrl-Mousewheel. With a bit more effort in the code - I have not yet *learned* canvas test-sizing & positioning - the numbers in it could be calculated. In Safari 4.0.5, the equation font size does not scale as desired with the present code. In Opera 10.10, the equation is blank but its box scales. In Firefox 3.0.19, the equation is blank and its box does not scale. In MS IE 8, there is no canvas. Later Firefox and Opera can draw text on canvas; but they are not on this PC. ABC<canvas ID=X></canvas>DEF <script> Rag = document.getElementById("X") Rag.style.background = "aqua" CX = Rag.getContext("2d") Rag.height = 20 ; Rag.width = 45 CX.fillStyle = "black" CX.textBaseline = "top" CX.font = "0.9em sans-serif" CX.fillText("X = -\u221AY", 0, 6) </script> It will be possible to turn the JavaScript into a function call DrawEqn(ID, string) and a function definition. It should be possible to put the calling script directly after the canvas; likewise to construct and insert the drawn canvas dynamically. -- (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7) Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7)
From: dorayme on 6 Jun 2010 21:25 In article <EWlgzvHgt9CMFwqz(a)invalid.uk.co.demon.merlyn.invalid>, Dr J R Stockton <reply1022(a)merlyn.demon.co.uk> wrote: > dorayme posted: > > >One of the limitations of images is the fixed size. There are > >ways to have the size change with the user font size setting but > >it is not great in IE (I am referring to em dimensioning the > >image) so I suggest you consider > > The following web page source shows, What webpage? -- dorayme
From: Jukka K. Korpela on 7 Jun 2010 13:31 Dr J R Stockton wrote: > The following web page source shows, in Chrome 5.0, conventional text > characters (ABC DEF) on each side of an equation "X = - root Y", where > both the text and the equation scale together with Ctrl-Mousewheel. I don't see any web page mentioned, and I don't see the point of the exercise. > CX.fillText("X = -\u221AY", 0, 6) If we are still discussing alt text for equations, as the Subject line suggests, I wonder why you use the Ascii hyphen (called "hyphen-minus" in Unicode, to emphasize its ambiguous semantics) in the role of a minus sign. Surely the minus sign U+2212 would be semantically much more adequate, visually much better, easily distinguishable, and also better data for speech synthesis. If you expect U+221A to be rendered properly by the browser, surely it can handle U+2212 as well. -- Yucca, http://www.cs.tut.fi/~jkorpela/
From: Dr J R Stockton on 8 Jun 2010 10:15 In comp.infosystems.www.authoring.html message <dorayme-899748.112557070 62010(a)news.albasani.net>, Mon, 7 Jun 2010 11:25:57, dorayme <dorayme(a)optusnet.com.au> posted: >In article ><EWlgzvHgt9CMFwqz(a)invalid.uk.co.demon.merlyn.invalid>, > Dr J R Stockton <reply1022(a)merlyn.demon.co.uk> wrote: > >> dorayme posted: >> > >> >One of the limitations of images is the fixed size. There are >> >ways to have the size change with the user font size setting but >> >it is not great in IE (I am referring to em dimensioning the >> >image) so I suggest you consider >> >> The following web page source shows, > >What webpage? Had you read the rest of the article you would have seen it following ; ABC<canvas ID=X></canvas>DEF ... </script> -- (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7) Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7)
From: Dr J R Stockton on 8 Jun 2010 10:20
In comp.infosystems.www.authoring.html message <z2aPn.17165$if1.1774(a)uut iset.elisa.fi>, Mon, 7 Jun 2010 20:31:51, Jukka K. Korpela <jkorpela(a)cs.tut.fi> posted: >Dr J R Stockton wrote: > >> The following web page source shows, in Chrome 5.0, conventional text >> characters (ABC DEF) on each side of an equation "X = - root Y", where >> both the text and the equation scale together with Ctrl-Mousewheel. > >I don't see any web page mentioned, and I don't see the point of the >exercise. If my intention has been to specify an actual Web page, I would not have used the word "source" there. >> CX.fillText("X = -\u221AY", 0, 6) > >If we are still discussing alt text for equations, as the Subject line >suggests, I wonder why you use the Ascii hyphen (called "hyphen-minus" >in Unicode, to emphasize its ambiguous semantics) in the role of a >minus sign. Surely the minus sign U+2212 would be semantically much >more adequate, visually much better, easily distinguishable, and also >better data for speech synthesis. > >If you expect U+221A to be rendered properly by the browser, surely it >can handle U+2212 as well. Your remarks are valid but valueless. -- (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7) Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7) |