Cards - 2013-10-22_14.46.35

JavaScript Poster Text

A year or so ago, I wrote some client-side JavaScript to allow allow input text to flow around images — it worked perfectly, and was optimized through a server-side process that produced a mask map from the image, which could be sent as JSON with the choice of image being mapped. Whilst optimised, it was non-dynamic — there were no uploads of user-supplied images, nor any provision in the client to analayse such images, tough that would be only a few lines of code. The purpose of the project was to allow users to create their own type-wrapped postcards, and that worked perfectly.

The next version of the library will have a version that allows not the wrapping of text to an image, but the automated sizing of text such that every line is fully justified (flush from margin to margin), with lines of less characters generally using bigger font sizes to till the line.

The user will be able to enter text with or without manual line breaks, and real-time editing should be supported.

It should be easy to program all of this within a day, perhaps two. My only concern would be cross-platform DOM manipulation, because I have used MooTools, jQuery and such libraries for so long now, that my DOM API is rusty. Then again, there are few places where node creation is actually necessary, so it will not be long-winded enough to justify use of any library.

Day two

Cards - 2013-10-22_14.46.35This morning I managed to tweak the existing e-card code to automatically scale free text, preserving line breaks. This afternoon, I should break it away from the input UI.