Re: Kamakawi Orthography
From: | Mark J. Reed <markjreed@...> |
Date: | Thursday, March 20, 2008, 20:55 |
On Thu, Mar 20, 2008 at 3:27 PM, David J. Peterson <dedalvs@...>
> ...it's useless without the font. Oh, but I see: you're suggesting
> that I make each glyph into an image and put *them* in a table?
> You know, that certainly would make the mouse-over job easier
> (as opposed to having to draw up coordinates for each cell), but,
> man, it would take a long time to generate all those images...
ImageMagick is your friend. If you start by taking the image you have,
and resize it so the width and height are each an exact multiple of 47
(45 syllables + the heading cells), say ...
$ convert -resize '940!x1410!' bisyl.png bigsyl.png
Then you can easily chop it up into cells:
$ convert -crop 20x30 +repage bigsyl.png cell%04d.png
That gets you 2,209 (47^2) images, named cell0000.png through
cell2208.png, where 0000 is the upper left cell, 0001 is the one to
the right of it, 0047 is the one below it, etc.
But as I said, I would rather use css sprites, as e.g. seen here:
http://www.mjnr.us/kamakawi/bisyl.php
Which uses just the one image (scaled up as above). Source code is here:
http://www.mjnr.us/kamakawi/bisyl.txt
Your image wasn't quite designed to be chopped up this way, which is
why you have the extra borders etc, but it's a good proof of concept
and the problem is easily fixable in the image (probably by ditching
the grid there in favor of the table border, which is also easier to
change later).
--
Mark J. Reed <markjreed@...>