Thanks for the questions, Henry. Actually I haven't looked much into the details of text rendering with HTML5. Some of the features described here http://www.whatwg.org/specs/web-apps/current-work/#text and https://developer.mozilla.org/en/Drawing_text_using_a_canvas. I think that Max already uses canvas text APIs for measuring the length of text for the DHTML runtime, he can tell you more.
Have a look at http://code.google.com/p/canvas-text/, a library for bringing the canvas text features to to the browsers which don't already have it (Firefox 2/3.0, Internet Explorer 6+, Opera 9+, Safari 3.x, Chrome 1.0). Here are some examples: http://canvas-text.googlecode.com/svn/trunk/examples/index.html Text layout is defined in the CSS3 draft at http://dev.w3.org/csswg/css3-text-layout/ Text direction: http://dev.w3.org/csswg/css3-text-layout/#text-direction Bidirectional text example: http://dev.w3.org/csswg/css3-text-layout/#bidi-example Line grid mode (ideograp mode) for Chinese chars, Hiragana, etc.: http://dev.w3.org/csswg/css3-text-layout/#line-grid-mode Horizontal in Vertical layout: http://dev.w3.org/csswg/css3-text-layout/#writing-mode Based on what I know right now I'd say that Flash 10 Text Layout Framework is ahead of what HTML5/CSS can do, although the quality of text rendering still feels better in HTML/CSS. It might be possible to implement a Canvas Text Layout Framework similar to what Flash 10 can do, but I don't know what the performance would be like for larger amounts of text in IE. It would be interesting to get some feedback on this from the open web guys, since there are some real HTML5/CSS3 cracks on that mailing list. If you want to support as many features as possible of the Flash 10 TLF APIs, it's going to be very difficult to implement that fully for the older browsers. The more I look into the HTML5/CSS3 stuff, the more I get the impression that those features can only safely be implemented for the advanced mobile browsers of iPhone, PalmPre, latest Android releases, Chrome OS, etc. If you still need to support DHTML runtime with IE 6,7 you are going to limit the number of possible features drastically. If you are building RIAs for the masses (with many customers using IE7, some even IE6) I'd probably just serve them an SWF version of the app. I'd be interested to hear what Max thinks, as well as anybody else listening/reading with maybe more expertise. - Raju On Mon, Jan 25, 2010 at 9:38 PM, Henry Minsky <[email protected]> wrote: > Hey Raju, > I'd like to start thinking about improvements to the <text> APIs. The Flash > 10 runtime has some new features in their Text Layout Framework and "text > engine" substate that give the programmer more control of typographic > options and text flows. Thus far we have not > built any new text classes with the Flash 10 text libraries, but there's > been some interest (for bidirectional text support ,for example) > > Do you know what the HTML5 text API's look like? Is there some common subset > that > we would want to try to support in a portable way? > > > > > On Mon, Jan 25, 2010 at 3:20 PM, Raju Bitter <[email protected]> > wrote: >> >> With the increasing focus on Ajax/DHTML - going in hand with nice new >> HTML5 features - the evolving W3C standards are going to have a strong >> influence on the LZX APIs in future versions of OpenLaszlo. Until now SWFx >> and AS2/3 have been the runtime providing many more features for OpenLaszlo >> than the browsers' JS engines. That's changing right now, and the question >> is: How is OpenLaszlo going to incorporate the HTML5 APIs into LZX? Take >> Flash SharedObject >> (https://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/SharedObject.html) >> and W3C WebStorage (http://www.w3.org/TR/webstorage/) as an example: How are >> we going to create APIs providing those features across runtimes? >> >> If there similar functionalities in SWFx and HTML5/W3C standards, are we >> going to create a common API for - using the example of local storage - >> key-value pairs in DHTML using WebStorage, and duplicating that behavior in >> SWFx using SharedObject functionality? Or is the focus going to be on open >> standard based features which will be accessible from within SWFs through >> SWF->JavaScript calls? >> >> A powerful feature would be the capability to define the runtime >> environment for a method/script as an attribute to the method or script. >> Imagine code like this inside a SWFx runtime app: >> >> <method name="storeNote" runtime="javascript" args="id,title,body"> >> // Some JavaScript code using the WebStorage API to store a note >> // This method would be turned into a JavaScript function inside the >> browser >> // Any call to this method would be passed from the SWF app to the JS >> function >> </method> >> >> If the same app is compiled as DHTML, passing of method calls would not be >> necessary. I'd be interested in hearing what you think, or what your ideas >> are for OL apps using many of the new JS/HTML5/W3C features. >> >> - Raju > > > > -- > Henry Minsky > Software Architect > [email protected] > > >
