:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Snippet name:
String2png
Description: Generate image from string with any .ttf or .otf font
Version: 1.0 Alpha
Date: November 16, 2008
Licencing:
GNU General Public License (GPL) (
http://www.gnu.org/copyleft/gpl.html)
Authors:
Enrique Erne (
http://mild.ch)
Based on WriteWord 0.24
Example:
[[String2png? &file=`media/RadisSans-medium.otf` &text=`Hello World!` &text_size=`36` &text_color=`#0000ff` &letter_spacing=`3` &word_spacing=`10` &format=`png` &transparent=`TRUE` &tpl=`yourChunk`]]
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Features:
- letter-spacing and word-spacing
- real alpha transparency
- automatic width, height and baseline adjustment
Compared to WriteWord 0.24:
- drops support for angle
- real alpha transparency
Known Bugs:
- negative letter-spacing and alpha transparency cuts letter edges
Not yet tested with modx revolution.
I am still uncertain about the naming. Should the arguments be as close as possible to the WriteWord snippet. Should there be a compatibility mode?
Please note is a pre-release, any feedback appreciated.