(tiny) clarification on bi-directional text support in the next Flash Player

I see that my fellow product manager, Matt Chotin, has “committed” support for bi-directional text support in the next major version of Flash Player on the Flex Components Yahoo group. 😀

Don’t worry, I’m not taking it back. Be assured that bi-di is a long requested capability that we do indeed intend to support in the platform. But I thought I’d clarify a bit since people will want more details.

First off, as everyone knows, the text layout engine in the current Flash Player does not support bi-di. There are plenty of ways that you can simulate it for certain use cases, but we acknowledge that it falls well-short of what our developers need. To address the shortcomings and limitations, we are improving the text layout capabilities in the next Flash Player so that at a low level it will enable support of bi-di and complex text in your applications. The new low level text framework will be used to build text components (probably a library of text components) with greater functionality than what we have today.

Want to help us figure out what we should be working on? Are there components you would expect Adobe to provide? What types of applications are you trying to build? Let us know what your requirements would be for improved text layout, bi-di or other things you’d like to do with text in your content and applications that you can’t do today.

36 Responses to (tiny) clarification on bi-directional text support in the next Flash Player

  1. I would *really* like support for configuring the vertical alignment (top, bottom, center). Thanks!

  2. Emmy,Without hesitation I can say that a Label, TextArea and TextInput with real BiDi would allow us to handle most everything else by ‘tweaking’ the flex framework.Those things alone would let us take the framework to a respectible 95% BiDi compatible level very quickly.Please, please, please feel free to contact us on this. I have a few years of experience trying to make the current flex framework work for RTL readers.Michael Labriola

  3. Daisy Tan says:

    When will the next veersion of flash player( I think it will be flash 10 ) be available? Any preliminary targeted date?

  4. mike says:

    please check the torque on the subscript and superscript nuts while you’re tinkering in that engine.. 😉

  5. nz says:

    A native XML UI dialect would be awesome (for graphics, media and “base” controls like buttons etc), like they have for Silverlight and WPF, then Flex and other Flash Frameworks can be built on top of it.

  6. emmy huang says:

    Nate, Michael, Mike, and nz: ideas noted!Daisy: yes, it would be our tenth major release. We haven’t announced timing or release dates yet.cheers,e

  7. Austin says:

    This is absolutely awesome that hebrew will finally be supported!!!!!!! Great Job Guys!!!!!

  8. Mitch says:

    Changing the text selection color is really needed since you can’t currently put editable text above a black background (and be able to see what you’ve selected).It would also be great if some of the more standard text selection mouse behaviors were implemented like triple-click to select a line, double-click dragging to select words, etc.Super/subscript (or perhaps just baseline formatting) would be terrific too.

  9. MohDesign says:

    alslam alikomproblems are not just for rtl viewingalso with embeded font for the rtlfor example: (arabic language)the charecters are not Separate like englishit’s relatedi can see the arabic language good in flash player but NOT:a) when the font are embded “the char. will Separate. some times will not showen.b) when the text contains another language “english”i have an experience for about 2 years to solve this problems after i know that macromedia will not support rtli was finish my solution and got it to work you can see result herehttp://www.flashyat.com/vb/vbstate_loader2.swfthere are some problems i can’t solve it for some symbole like ( ) or [ ]caze i use a php script to convert the result and i was read there are a bug within php about rtl and the symbolemy idea to let flash working with rtl (just for textarea):1: read the full text and correct it to rtl2: convert every charecters to unicodesome arabic charecters have 4 faces like”arabic charecter ‘fah'”a) in the begining of the word ‘ فـ ‘b) in a middel of the word ‘ ـفـ ‘c) in a end of the word ‘ ـف ‘c) just the charecter ‘ ف ‘so u need to converts every charcters by known where this charecter will writting in the word ( char. postion )3: return the result to flash in 3 ways as i want.a) as htmlb) as unicode /u…..c) aS URL_ENCODEDall the problems for flash and rtl:1) flash does not support rtl. ‘textarea’2) flash does not support embded rtl font. ‘textarea’ & ‘input text’3) flash does not support rtl for the input text. ‘no way to solve this by AS’ lag problemshope i can help ;)mohammed

  10. In short, if Indesign can do it, we’d like flash to do it. Since that’s not really a reasonable request, how about getting rid of the 128 size limit, using points instead of pixels, and removing (or making editable) the two-pixel padding/border.

  11. judah says:

    For me bi-di, more html tags supported, apollo html control in the flash player???, embedded fonts easier to apply (handled more intuitively), better rte component**, html text support in all text components and more responsive copy and paste in text fields.** more features, more tags supported, etc

  12. powerofthewind says:

    Hi …is this flash apollo flex and acrobat connect will support bi-dictional ?

  13. g10 says:

    text wrapping, text overflow… inline (vector) images…better otf support, not neccesarily ligatures therefore (as this would probably make text more unreadable on screen), but I have the impression that otf fonts were rendering better in flash 8 then in cs3.from a designer point of view the feature set of indesign is the endgoal (as Daniel pointed out), allthought that would probably mean a big increase in filesize for the flash player…

  14. Jim says:

    Hi,I would like textwrap. I would really like to be able to wrap text around an object/path just like in Fireworks.

  15. Atar Sh. says:

    A BiDi-solution that won’t make me go through anything I’ve ever published and un-fix it :)I don’t know if there’s a way to find out from within the player what player version the swf was published for, but if such thing exists…also, as mentioned above, the greater problem is selectable text.

  16. Behrang says:

    At last Flash Player will support RTL!I think MS SilverLight made this happen to Flash!Thanks to MS and SilverLight!This was my main feature request for 6 years, so this should has relation to MS.I think it’s better to move RTL support not only to Flash Player, but to all products, like Photoshop etc.

  17. Hi Emmy,I’m not sure what these changes will mean for HTML rendering but I would love to see support for inline images in textfields. I what a pain and near impossible task this currently is in Flash/Flex.Use case: we build a lot of chat applications and inline smilies are a must-have feature. Proper image rendering in HTML text fields would provide this.thanks

  18. emmy huang says:

    @powerofthewind — Yes, that is the idea. The dependency is on the runtime, so Flex/Flash content in Flash Player 10 or a player 10-based Apollo runtime, and a player 10-based Connect add-in would support these new capabilities.

  19. Ray Greenwell says:

    Small request:Make it so that setting a TextField’s width and height to the values in textWidth and textHeight don’t cause it to re-layout the text. Right now you have to add 5 to the textWidth and 4 to the textHeight. (And those magic numbers don’t have constants anywhere).

  20. Richard says:

    Here are my requests:Bulleted lists and underlined text in the IDE, without using dynamic text and HTML.Numbered lists (which you can’t even do with HTML in Flash).Wrapping text around arbitrary objects, and using text to fill non-rectangular objects. I’d like to see this work like Apple’s Pages, where it can wrap around non-rectangular items and recognizes alpha channel in PNG’s for wrapping as well. I’d like this to work right in the IDE and not require Actionscript (though it should be Actionscriptable as well).Placing text on a path (same as above, should be able to do in the IDE, but also Actionscriptable).

  21. Mika says:

    Hi Emmy,Is it going to support languages unsupported previously, like Armenian, Georgian, Hindi, etc?

  22. Miles says:

    Hi Emmy, this is great news. Full bi-di for both display and input TextFields would be fantastic and will really open up the tool to markets which are currently very problematic – thus expensive – for us to currently develop for.It would be great if text direction is something that can be defined at run-time, either programmatically or through some system default, so that the same SWF can be used for both LTR and RTL text without the need to recompile for a specific direction.In addition to bi-di, here are some other improvements I would love to see within Flash fonts and TextFields.Extending from what you can already do with applying StyleSheets to TextFields:• Ability to centrally define one or a number of StyleSheets for use with TextFields that specify TypeFace, Colour, Size, Spacing, Alignment, Anti-Aliasing, etc.• Within the Properties panel for a TextField, enable a dropdown selection of style classes from those sheets.• Adjustments to any other settings within the TextField Properties panel will override that property of the style class.• Applying different styles should be reflected visually within the IDE to aid design and layout.• StyleSheet(s) should be external to the FLA/SWF in order to be able to change style properties without recompiling the SWF or resaving the FLA.• Ability to programmatically load or define that StyleSheet(s) to enable run-time switching of styles.Font Embedding and sharing. I would love to see this become easier, as we currently have to employ a number of work-arounds and hacks to get this working well for localization, particularly with non-Latin alphabets. Ultimately, I’d like to be able to have:• All fonts embedded within one, or several, external “FontLibrary” asset SWFs that contain only FontSymbols.• Ability to specify exactly which character sets are embedded within those FontSymbols from the Library panel, rather than having to first create an instance of a TextField.• FontLibrary asset file(s) can be changed / recompiled without having to recompile the main application SWFs that utilize those FontLibraries.• FontLibrary can be programmatically loaded at run time on an ad-hoc basis.• Loading a FontLibrary asset file into a main application SWF will make those fonts globally available to all parent / child movies.• Loading subsequent FontLibrary assets that contain repeated FontSymbols of the same typeface will be applied cumulatively, not destructively.• Combined with the use of StyleSheets, external FontLibrary assets would allow very fast and easy alteration and localization to an entire site/application.Vertical alignment within TextFields, enabling Top / Middle / Bottom. This would not only be a useful layout tool, it would also facilitate the localization of fonts, as described above. Often typefaces for non-Latin alphabets require being displayed at larger point sizes to remain legible, and being able to vertically align those in the middle, for titles and button labels and so on, would help to ensure they don’t break layouts by dropping too low. Also, for many languages other than English, equivalent translations are often noticeably longer, and the ability to have them wrap upwards or align middle would help ensure that two lines of text still fit nicely into a design in the same way that a single line would.Font Packaging. For distributing source files, it’d be great to have all Fonts used in an FLA, or entire project, collected and packaged for easy distribution along with the source files. Or some way of embedding fonts into FLAs so that when it is passed from designer to developer they don’t have to hunt for fonts.Linking the flow of TextFields so that, as text spills out of one TextField, rather than having to scroll, it starts flowing into the next TextField. Just like Desktop Publishing software.Font outline strokes, with custom color, weight, and option to punch out original text (as true vector shapes, as opposed to using a Glow Bitmap Filter).Other nice-to-have would include: text along a path; text flow around objects; text flow constrained inside a shape.Many thanks for your time.

  23. Horseback says:

    Great,how about flash being able to write a txt file without php ?Kind regards

  24. majordan says:

    Hi,The addition of bi-di text support is great news. Key features I’d like to see include:1. Support for embedded fonts.2. Support for hypertext links in bidi text fields.3. Support for:U+200E LEFT-TO-RIGHT MARK (U+200E)U+200F RIGHT-TO-LEFT MARK (U+200F)4. A native way to provide keyboard access to hypertext links within text fields. (not exactly related to bidi text but long overdue)5. A way to specify locale or the primary direction of text within a swf, so that that FlashPlayer calculates its default tab order correctly.6. Fix wrapping behavior of Unicode whitespace characters:U+2000 EN QUAD (U+2000)U+2001 EM QUAD (U+2001)U+2002 EN SPACE (U+2002)U+2003 EM SPACE (U+2003)U+2004 THREE-PER-EM SPACE (U+2004)U+2005 FOUR-PER-EM SPACE (U+2005)U+2006 SIX-PER-EM SPACE (U+2006)U+2007 FIGURE SPACE (U+2007)U+2008 PUNCTUATION SPACE (U+2008)U+2009 THIN SPACE (U+2009)U+200A HAIR SPACE (U+200A)U+200B ZERO WIDTH SPACE (U+200B)U+200C ZERO WIDTH NON-JOINER (U+200C)U+200D ZERO WIDTH JOINER (U+200D)Languages like Thai have no spaces between words. Support for the zero-width space would at least provide a way to delimit Thai words in dynamic text fields so that lines wrap correctly, without having to add the weight of a Thai word-breaking algorithm to the FlashPlayer.7. Fix the wrapping hyphen/space bug in dynamic text fields.8. An improved interface for packaging fonts for runtime sharing. Perhaps providing a way to specify content files or directories of content files, and extracting all unique characters to embed in a font library. We use a Perl script for this now, and it helps keep the file size down for our Japanese font library.– Michael

  25. Eitan says:

    Hi,I hope when you’re talking about bi-di is not only for text components. I like java solution to allow to define the components orientation on the Containers. So i.e. if you have a form and set an LTR orientationn will redistribuite all childrens according to LTR rules.

  26. Dear Emmy,I am very curious to see your “solution” for arabic and other RTL languages.I am working for the Food and Agriculture Organization of the United Nations and we have developed an e-learning application that is based on Flash and XML. You can see it at http://www.imarkgroup.org (you have to register first to be able to access the courses, but this is free)Arabic is one of our official languages and we will have to offer our courses in arabic. Together with the library of Alexandria (Egypt) we are developing some workarounds to be able to load arabic text from XML into our application and show it correctly.We encountered a lot of problems:- wrapping of sentences- punctuation- mixing of latin text and arabic text- usage of HTML tags (&ltb&gt,&lta>,<li>,etc) within the arabic text for formatting.We have been able to “solve” most of these problems… Actually it is not really solving the problem, but finding ways to work around the problems. We have done this as follows:Step 1: Breaking up paragraph into separate lines;Step 2: Close the “unclosed HTML tags” for every line;Step 3: Reverse the “structure” of the every line (necessary when you mix arabic with latin text and when you have HTML tags in your textStep 4: Redefine HTML tags (&ltb> becomes &lt/b&gt, etc.)Step 5: Adaptation of punctuation.The script we developed for this workaround consists of more than 400 lines of code and it took me more than 4 weeks to develop.We have now something that works pretty good, but ocassionally we have some problems, especially when we use brackets in the text, which we do quite a lot as we give explanations in arabic text when we mention english words in the text. In these cases we have manipulate the XML document by hand. This way the text in the XML is not correct, but it shows correct within the applicationThe new text components you are developing that would support Bi-di should also be able to:- load text from an external document (XML)- show mixed arabic and latin text- understand HTML formatting text such as &ltb&gt,&lta>,<li>, etc.- show characters like “(” and “)” correctlyIf you need someone to help you test these new text components you are developing or when you need some inputs from us or to pick our brain, please do not hesitate to contact me.Regards,Peter Bruggeling

  27. Vertical Alignment would be awesome! It should be implemented similarly to HTML/CSS (top, middle, bottom).

  28. ahmad says:

    May peace and Allah mercy and blessings be upon you,I’m currently developing the next version of Flaraby, a Flash component that enables the display of Arabic and english text in .swf files, including embeding fonts.You can test it here:http://www.arabicode.com/flaraby/My guides on this is the html rendering engine in IE, and the very good article here:http://people.w3.org/rishida/scripts/bidi/First the biggest problem is the wrapping of the words, either with Arabic or English at the same time. I succeeded to make the wrap correctly, but the problem is I can’t have an accurate character/word width using the textWidth property for English AND Arabic in the same line, so the text may go further than it should. This also differes from one size of text to the other, also from one font to the other.Another problem you could encounter, is the html tags begining in an Arabic senetnce for example and ending in an English one, including having multiline on.I have made some examples of html sentences with complex combinations like:The title is مفتاح[font color=’red’] معايير الويب in[/font] ArabicThis also renderes is differently if you set the direction to “RTL”Also,The title is (مفتاح [font color=”#ff0000”]معايير الويب!‏) in[/font] Arabic.For RTL and LTR.I would be glad if the new support include embedding fonts, ie. no need to install the Arabic language for example in the target user machine.If any help needed, I’m here to help.Thank you.

  29. Rich Oren says:

    I would love to have a text component that mirrored the text matrix found in InDedign for a perfect 1 to 1 match.Flash has a padding that Indesign does not.Rich

  30. aarif says:

    Hi guysi come up with the idea using xml and css to import arabic (rtl languages) in flash.http://creativeuae.wordpress.com/2007/07/20/arabic-in-flash-with-some-changes/similar post : http://creativeuae.wordpress.com/2007/07/25/flaraby-arabic-support-in-flash/hope it will helpaarifhttp://www.aarif.be

  31. ahmad says:

    A free edition of Flaraby3 (Flaraby3Lite) is available for download.More info here:http://www.arabicode.com/flaraby/

  32. Adam Twardoch says:

    If you implement complex script support, I gather you’d do this through OpenType Layout. In this case, I’d urge you to also allow to specify arbitrary OpenType Layout features so designers could turn on and off small caps, ligatures and swashes that are present in thousands of OpenType fonts that are out there.A.

  33. k.l. says:

    Please: Full support of OT layout tables, just like in WPF.And I always thought that Adobe is the company which cares for type and typography … :))

  34. Miguel Sousa says:

    Me too, asking for full OpenType Layout support. This is one of the key functionalities that will make the Flash Player platform even more successful.

  35. Vafa says:

    Hello,I think the basic things have been noted already. But if Flash is looking for shares from this market, a FULL ( I mean full) support for bi-di is essential.We work on e-learning material for this part of the world and thanks to xml-actionscipt linkage we can be very much portable, but as soon as we have to deal with rtl texts and passing them back and forth between forms and XMLs, pffffff, we come down to cry….I talked about this with people in Adobe stand in Gitex too, and tried to explain the whole thing to them, I hope I could give the real feeling to the developers and strategic planners of Adobe…If there is no chance or plan for supporting this, well, that would be nice to tell us, and we will try to find another way…but we will miss you :-)Looking forward for the new release…please hurry up:-)Vafa

  36. Ram Almog says:

    Hi Emmy.As an Israeli flash developer, this was one of the key issues we were battling in the past years trying to address this from different angels. Finally, recently we have completed our development for a full bidi support for the adobe flash player (not including input fields) as a custom AS componant we use. If you are interested in more details or samples we will be happy to share this knowledge and discuss it. You are more then welcome to directly contact me via email.Ramster