Today I was thinking about how to write a web app that draws comic bubbles. There are many parts and solutions to the problem. It’s one of those things that gets complex quickly, unless you’re willing to remove some of the harder features.
I need to spend some time thinking about compromise, as a perfect solution is unlikely given the tools available for web applications.
Some of the problems:
- Embedding special fonts
- Resizing irregular bubbles
- Adding/positioning bubble parts
- Positioning fonts based on irregular edges
- Clipping bubbles to strip edges
- How/where to render (client or server, svg, js, raster, etc.)
I can see a few different approaches. Each solves a few of the hard problems, and each has its own rough spots.
One approach would be to perform the rendering on the server side. Something like Inkscape could be pared down to run as a web service. Comics would be stored in SVG, but rendered to GIF/PNG to embed in the web pages. Comic authors would edit their strips using rich Javascript approximations (edit boxes over the rendered form), and readers would see the already-rendered strips. This allows for high quality rendering, for authors who wanted to go to press with their strips.
Another approach would live within the limitations of xhtml/css/javascript. Fonts would be limited, and all rendering would be done client-side. Features could be added to this as browsers matured, but would depend heavily on browser vendors and compatibility. This approach would initially limit things like clipping, available fonts, etc., but would likely be easier to build.
There are dozens of other approaches too. Flash or the canvas widget could be used, or something written in Java. Luckily I don’t have time to start today, so I’ll have to let my subconscious gnaw on it for a while.