Bidirectional text and MathML

Ahmed Hindawi pointed out that Digital Editions does not support bidirectional text for ePub, so it is not possible to display documents that use right-to-left writing. Certainly it is a missing feature: IDPF standard for ePub mandates that support. As we internationalize the application, we certainly plan to add that as well as other features that are necessary to display Arabic (ligatures and glyph shaping). I should just point out that the fact that Flash 10 will support that does not automaticaly means that Digital Editions will get it for free, as ePub rendering engine in Digital Editions uses different pipeline for text layout.

Another point that Ahmed made is that there is no support for MathML. In the case of MathML the situation is a bit different from bidirectional text: MathML is not something that IDPF standard mandates for ePub. It is only possible to include MathML “islands” in XHTML if a fallback image is included as well and an ePub viewer is free to display that fallback image instead of rendering MathML. So when including a formula in an ePub document one has to supply either a bitmap (PNG or GIF) or vector graphics (SVG) that reperesents it. Bitmaps for formulas are used on the web quite a bit (e.g. some Wikipedia articles), but their major drawbacks are that they look bad when printed (or font size changes), they don’t reflow when width becomes small and they are unaccessible for blind. Vector graphics is basically how formulas are represesnted in PDF. This does not fully solve the accessibility and reflow problems, but they certainly can be made look as good as MathML. I think that for the time being including vector graphics image for a formula is the best bet, maybe along with a MathML island.