CreateJS/EaselJS — pull request #149 by martensms (2012-06-21 09:45:37+00:00)
Title: BitmapText implementation for faster Text Rendering via Sprites

I implemented the BitmapText class which is able to render text via given sprites & spritemaps.

It is actually a port of the original implementation in lycheeJS, which is licensed under MIT:
http://github.com/martensms/lycheeJS

Due to blitting it is much faster in rendering text than using the canvas native text implementation.

The modification of the original Text.js file only falls back to the old behaviour if no settings object is given. The check against having an object as font (of instead a string like '12px Arial') will result in usage of the BitmapText and guarantees the old behaviour via native canvas text as before.

The fonts were generated with the Font Tool in LycheeJS, which can either be seen in the github repository or be visited at this URL. There's much algorithm magic in there as it supports outlines, detects baselines, corrects baselines and offsets of letters etc. - so I don't know if it makes sense to port it to the EaselJS framework as it will probably take much time for integration.

You can take a deeper look at it here:

https://github.com/martensms/lycheeJS/tree/master/tool
http://martens.ms/lycheeJS/tool/Font.html

~Cheers, Christoph