View previous topic :: View next topic |
Author |
Message |
cameron_m Smarty Rookie
Joined: 28 Feb 2006 Posts: 15
|
Posted: Thu Mar 23, 2006 12:21 am Post subject: Render/Generate Title Images with a font |
|
|
We were having a play round with writing a create_image_png function and placed the overview to how we did it on our blog.
We needed to be able to generate a image file for a replacement header image in a non-web font.
Have a read here, it will outline what is required to achieve it:
http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/03/23/basic-image-text-generation-in-view/
Allows you to do a similar {create_image_png text="Hello World" param=$configuration} and get a (cached) filename reference to the image. The post discusses the way of implementing it using simple caching.
Hope it helps you implement your solution, If you have any suggestions please feel free to post on our blog.
Cheers
Cameron |
|
Back to top |
|
McSodbrenner Smarty Pro
Joined: 19 Sep 2004 Posts: 101 Location: Hamburg, Germany
|
Posted: Thu Mar 23, 2006 8:23 am Post subject: |
|
|
Maybe this is interesting for you.
There is a plugin in the wiki which does the same. You can find it at:
http://www.cerdmann.com/imagetext/
Greets,
Christoph _________________ Grüzi,
Christoph
My sweet home: www.webboarder.de
Do not visit!! It is private!! And it's mine! |
|
Back to top |
|
cameron_m Smarty Rookie
Joined: 28 Feb 2006 Posts: 15
|
Posted: Thu Mar 23, 2006 10:49 pm Post subject: |
|
|
Thanks for the reply! I have updated my blog to have a link to his version. It appears to be a good implementation of it, main advantage having the styles in a ini file (Better seperation from the controller which I like).
I am still trying to figure out if he supports transparent PNG images? I will still use ours for now until then.
Cheers
Cameron |
|
Back to top |
|
McSodbrenner Smarty Pro
Joined: 19 Sep 2004 Posts: 101 Location: Hamburg, Germany
|
Posted: Fri Mar 24, 2006 8:46 am Post subject: |
|
|
Hi Cameron,
probably I will implement the PNG support when the IE 7 finally comes out and there is a stable PNG transparency support in all browsers. Before I do not really see the necessity...
Greets,
Christoph
BTW: Thanks for the link _________________ Grüzi,
Christoph
My sweet home: www.webboarder.de
Do not visit!! It is private!! And it's mine! |
|
Back to top |
|
cameron_m Smarty Rookie
Joined: 28 Feb 2006 Posts: 15
|
Posted: Sun Mar 26, 2006 10:27 pm Post subject: |
|
|
Hiya Again, Thanks for your reply
We have needed to be able to render fonts over a background image. We have used a simple IE hack (JavaScript) which so far has been everything we need.
You can learn more about the Javascript hack on my post on my blog:
http://www.melbournechapter.net/wordpress/programming-languages/cman/2006/03/20/png-alpha-for-msie/
A colleague posted a JavaScript file that (when loaded) obtains a list of the DOM images that are PNG and manages to fix the compliance. You can simply include the javascript as a reference in the <head></head> tags and you are good to go.
Hope it helps.
Cheers
Cameron
P.S. Not a problem RE the link. Anytime _________________ Checkout blog on http://www.melbournechapter.net |
|
Back to top |
|
McSodbrenner Smarty Pro
Joined: 19 Sep 2004 Posts: 101 Location: Hamburg, Germany
|
Posted: Mon Mar 27, 2006 8:49 am Post subject: |
|
|
Hi Cameron,
take a look at the wiki:
http://smarty.incutio.com/?page=PNGImageOutputFilter
I used the sleight-js for several projects. Seems to be similar to the script your colleague posted... but I will probably switch to the filter cause it does not require Javascript. Perfect!
When I have plenty of time I will implement PNG support... perhaps
Greets,
McSod _________________ Grüzi,
Christoph
My sweet home: www.webboarder.de
Do not visit!! It is private!! And it's mine! |
|
Back to top |
|
core2 Smarty n00b
Joined: 21 Jan 2005 Posts: 4
|
Posted: Mon Apr 03, 2006 1:04 pm Post subject: Another solution for titles with font is SIFR |
|
|
This is not smarty related, but is not bad alternative to font titles.
It's a flash titles, generated dynamicly, from custum font. It's saves a lot of traffic if you using it for many titles, becouse it's download a flash font just once (10-20K) and generates titles with flash. It's verry easy to use. I'm sure that can be maked plugin for smarty.
Cool example can be found here:
http://tests.novemberborn.net/sifr/full-page.xhtml
Home page:
http://wiki.novemberborn.net/sifr
p.s. Sorry for my bad english. Feel free to edit my post ;) |
|
Back to top |
|
|