Apply stroke/other filters to text ctrl?
by Doc308 · in Torque Game Builder · 02/18/2008 (9:30 pm) · 0 replies
Ok, I'm trying to figure out if this is possible, and I haven't seen anything out there that discusses this, though I could be wrong... Anyways, I'm trying to figure out if it's possible to apply a stroke filter to a regualr text object in TGB. I have been toying with the fonts and such, and I found a good one I'd like to use with a project I am working on. I just want to be able to acentuate the text a little bit more than just what is standard. I have photoshop, and I can create the same text font and apply a stroke filter, and that's pretty much the look I'm going for, but I just want to see if there's a way to do that with the text ctrl in TGB...
I figure there's a few options available to me.. One, is to create a script that searches for the edge of the color of the text, and applies the stroke around it. This, would of course require some serious programming, which I'm not afraid of. Another option, would be to create my own text font in photoshop with the stroke filter applied to every letter, and then importing the new font into TGB. My last, and current option, is by using single letters with the proper settings already applied via photoshop, and going through some routines to place the text accordingly.
Also, if the latter and current option is the best, then perhaps someone could shine some light on picking letters out of an array object without using strstr and finding the letter that matches through a for loop. Basically I'm making a project that will display words, and I need the words to change, so I'm creating global array to store my words at the moment, and using the strstr function to see which letter is in each place and using my imagemap to display that letter. I know my way workds, and it's not a serious strain, but if there's an easier way, I'd sure love to hear it.
Pretty much what I'm using at the moment, is a for loop based upon the length of the string, calling a function that matches the letter based upon the for loop, and then sets the image to that letter. Something along the lines of.. the fifth letter of the alphabet is e, so my function states it uses EImageMap... so on and so forth, but cycles through 26 settings for each letter for the length of the word.
I can put my code up if it'd be of assistance. Any help would be greatly appreciated.
I figure there's a few options available to me.. One, is to create a script that searches for the edge of the color of the text, and applies the stroke around it. This, would of course require some serious programming, which I'm not afraid of. Another option, would be to create my own text font in photoshop with the stroke filter applied to every letter, and then importing the new font into TGB. My last, and current option, is by using single letters with the proper settings already applied via photoshop, and going through some routines to place the text accordingly.
Also, if the latter and current option is the best, then perhaps someone could shine some light on picking letters out of an array object without using strstr and finding the letter that matches through a for loop. Basically I'm making a project that will display words, and I need the words to change, so I'm creating global array to store my words at the moment, and using the strstr function to see which letter is in each place and using my imagemap to display that letter. I know my way workds, and it's not a serious strain, but if there's an easier way, I'd sure love to hear it.
Pretty much what I'm using at the moment, is a for loop based upon the length of the string, calling a function that matches the letter based upon the for loop, and then sets the image to that letter. Something along the lines of.. the fifth letter of the alphabet is e, so my function states it uses EImageMap... so on and so forth, but cycles through 26 settings for each letter for the length of the word.
I can put my code up if it'd be of assistance. Any help would be greatly appreciated.