Font Renderer plugin for WolfCMS.
This is a small plugin for WolfCMS that I wrote. It makes it very easy to insert some text using any true type font into a page. The actual text will be rendered by the gd library to a PNG.
Setting up the plugin.
Once you have installed and activated the plugin you will have to change the settings on the settings page.
For example here are my settings :
Path to image cache: /public/images/pngTitles
This is the folder into witch the png files will be stored.
Path to font file: /wolf/plugins/font_renderer/fonts/Cardo99s.ttf
This is the name and location of the ttf file. I put them in a fonts folder under the plugin folder.
Font size in pixels.: 24
Enter here the size for the font you want. It Must be a number.
Background Color.: FFFFFF
This will be the background color for the png files. You must use hexadecimal notation and with no ‘#’ as it is in HTML.
Text Color.: 000000
This will be the text color for the png files. As above you must use hexadecimal notation and with no ‘#’ as it is in HTML.
Transparent background: No
If set to Yes the image background will be transparent.
Using the plugin.
You can use the plugin by inserting a simple php function into a page.
For example :
<?php font_renderer('Someting nice.') ?>
You can also override most of the settings when calling the function.
For exanple :
<?php font_renderer('Bang.',32,'FF0000','000000','/wolf/plugins/font_renderer/fonts/impact.ttf',true); ?>Changes the size, the text color, the background color, the font and the transparency.
Examples
<?php font_renderer('Someting nice.')?>
<?php font_renderer('Big and red.',32,'FF0000','000000','/wolf/plugins/font_renderer/fonts/Sansation_Regular.ttf',true); ?>
<?php font_renderer('Big Blue.',64,'0000FF','000000','/wolf/plugins/font_renderer/fonts/Sansation_Bold.ttf',true); ?>
You can download the plugin here.