WriteWord 0.23
This snippet allows to generate image from the text with any font. Caching, templating and other options.
Submitted: Sep 6th 2007 | License: GPL - GNU Public | Downloads: 423
Description
Sometimes it is needed to use non-standard fonts to create a beautiful design or to follow strong requirements of the corporate identity.
This snippet allows to generate image from the text with any font. Images will be saved in the system cache folder and MODx will use it without creating it again. When website refreshes all files in the cache folder will be removed and they will be generated again while the document renders.
This snippet is like some other similar scripts (text2image, gtext) released early, but with more parameters. Some code was taken from MODx veriword.php.
Great thanks to Igor from Russian MODx Community for the translating of documentation from Russian to English!
Instructions
All instructions in readme.txt inside.
The sample usage[[WriteWord?&file=`media/SkodaSansRg.ttf` &text=`Your text will be here.` &text_size=`12` &text_color=`#FFFFFF` &bg_color=`#CCCCCC` &quality=`100` &tpl=`writeword`]]
The writeword chunk
<h1 class="pagetitle" style="background-image: url([+ww.fileurl+]); width: [+ww.width+]px; height: [+ww.height+]px;"><span>[+ww.text+]</span></h1>
h1.pagetitle span{
display: none;
}<h1 class="pagetitle" style="background-image: url(/assets/cache/499063c8c7a81af2e7691193c07f690d.pageCache.jpg); width: 167px; height: 15px;"><span>Your text will be here.</span></h1>
Updates