Canvas Text Goes Bidirectional
The patch for the last of the major outstanding bugs with the WHATWG Canvas text API landed in time for a nearly spec compliant implementation to make it into Firefox 3.1 Alpha 1. I am pleased to say that Canvas now supports right-to-left text and bidirectional text resolution on its text drawing functions.
Canvas has undergone and will be undergoing some other changes, as well. I went through and cleaned up a lot of old code so that, among other things, Canvas uses Mozilla’s Thebes API instead of directly calling into Cairo. Philip Taylor has created a new set of unit tests for Canvas which are more extensive than before. Additionally, a patch has been sitting around for a while that adds shadow support to Canvas, which I hope to push to completion soon.
Tags: bidirectional, Canvas, Firefox, Gecko, HTML, Mozilla, RTL, shadow, text, WHATWG
July 23rd, 2008 at 8:41 pm
Great news - getting closer to the spec.
Pity the spec is lacking some things, compared to the Moz implementation. Specifically, drawing text along paths, and creating a path from text. The former of which can be *very* useful.