thrashr888 / textorize-server
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
831da34
Installation
textorize-server requires textorize to be installed. Once it's installed, clone these files straight into your web root.
Install textorize from Gemcutter:
$ gem install textorize
Or install textorize from Github:
$> gem sources -a http://gems.github.com
$> sudo gem install madrobby-textorize
Then clone textorize into your web root and setup the cache folder:
$> cd <your project's web root>
$> git clone git://github.com/thrashr888/textorize-server.git textorize-server
$> chmod 777 textorize/cache
Usage
Try it out on a webpage like so:
<img src="/textorize-server/img.php?f=arial&s=20&c=000000&g=ffffff&m=just_a_test" alt="just_a_test">
Or in your browser here:
http://localhost/textorize/test.html
And it should come out looking like this:

So far, textorize-server supports these options:
- f = font (whatever is installed on your server)
- s = size
- c = color
- g = background
- m = message
How it works
textorize-server turns the url into arguments for textorize to run on the server. It then caches the generated image and serves from the cache. If the file already exists, it skips the generation and just serves the cached image.
Disclaimer for Linux servers
textorize (I belive) only works on OS X because it uses MacRuby for it's image generation. A work-around for running this on your Linux servers is to view your website on your local machine and push the cached files to your server along with the code. This isn't perfect, but it should work!
License & Credit
MIT License Copyright (c) 2009 Paul Thrasher (http://vastermonster.com)
textorize by Thomas Fuchs (http://textorize.org/)

