thank you very much for creating this plugin! i’m a noob, so apologies if the answers should be obvious:
- can the one gtext snippet be used for multiple fonts, or should multiple snippets with different names be used?
- do you have some specific examples of how to use this? my first attempt resulted in an error as i tried to put the following into a document’s content:
the last few words in this sentence should be written [[gtext? &font=’CACPINAF.TTF’ &fontsize=’16’ & color=’#FFFFFF’ &bgcolor=’#000000’ & text=’in a cool font’]].
i replaced arial.ttf with CACPINAF.TTF in the snippet as that’s the font i uploaded into assets/files/fonts.
Sorry - not using ModX anymore 01/01/2007
-
☆ A M B ☆
- 24,524 Posts
Try backticks instead of single quotes around the argument’s values.
Sorry - not using ModX anymore 01/01/2007
-
☆ A M B ☆
- 24,524 Posts
Indeed it is, it shares a key with the tilde ( ~ ). Usually to the left of the 1 key, although on my iBook for some reason that key is § / ±, while the backtick/tilde key is to the left of the z.
i must be doing something silly - i put it into the content of a page (ie not in the template) and what showed up is
/assets/images/gtext_cb61fa08baa0726f734a314c20225319.gif
opening that image revealed it to be the text that was supposed to be displayed. here’s how i’m calling the text:
[[gtext? &font=`BabelSans.ttf` &fontsize=`16` &color=`#aa3e00` &bgcolor=`#dbeaf0` &text=`Graphical Text Test`]]
should that be in the source rather than the content?
thank you.
Sorry - not using ModX anymore 01/01/2007
-
☆ A M B ☆
- 24,524 Posts
I think you need to use the snippet as the value for the src attribute of an <img... tag.
<img src="[[gtext? &font=`BabelSans.ttf` &fontsize=`16` &color=`#aa3e00` &bgcolor=`#dbeaf0` &text=`Graphical Text Test`]]" alt="" />
ok - i will try that. thank you again!
Sorry - not using ModX anymore 01/01/2007
a couple of questions:
1) right now, i put the code into the source of page content. is that the only way to do it? i tried putting it into the content itself, but it just spat out the code like it was text.
2) i assume having control over kerning is too much to ask for?
thanks.
Sorry - not using ModX anymore 01/01/2007
is it not possible to use 2 instances on one page? i made 2nd graphic text which results in the following error:
Fatal error: Cannot redeclare class atextimage in /home/gatewayy/public_html/manager/includes/document.parser.class.inc.php(705) : eval()’d code on line 78
Sorry - not using ModX anymore 01/01/2007