Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Render/Generate Title Images with a font

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
cameron_m
Smarty Rookie


Joined: 28 Feb 2006
Posts: 15

PostPosted: Thu Mar 23, 2006 12:21 am    Post subject: Render/Generate Title Images with a font Reply with quote

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
View user's profile Send private message Visit poster's website
McSodbrenner
Smarty Pro


Joined: 19 Sep 2004
Posts: 101
Location: Hamburg, Germany

PostPosted: Thu Mar 23, 2006 8:23 am    Post subject: Reply with quote

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, Smile
Christoph

My sweet home: www.webboarder.de
Do not visit!! It is private!! And it's mine!
Back to top
View user's profile Send private message Visit poster's website
cameron_m
Smarty Rookie


Joined: 28 Feb 2006
Posts: 15

PostPosted: Thu Mar 23, 2006 10:49 pm    Post subject: Reply with quote

Thanks for the reply! Smile 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
View user's profile Send private message Visit poster's website
McSodbrenner
Smarty Pro


Joined: 19 Sep 2004
Posts: 101
Location: Hamburg, Germany

PostPosted: Fri Mar 24, 2006 8:46 am    Post subject: Reply with quote

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 Very Happy
_________________
Grüzi, Smile
Christoph

My sweet home: www.webboarder.de
Do not visit!! It is private!! And it's mine!
Back to top
View user's profile Send private message Visit poster's website
cameron_m
Smarty Rookie


Joined: 28 Feb 2006
Posts: 15

PostPosted: Sun Mar 26, 2006 10:27 pm    Post subject: Reply with quote

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 Smile
_________________
Checkout blog on http://www.melbournechapter.net
Back to top
View user's profile Send private message Visit poster's website
McSodbrenner
Smarty Pro


Joined: 19 Sep 2004
Posts: 101
Location: Hamburg, Germany

PostPosted: Mon Mar 27, 2006 8:49 am    Post subject: Reply with quote

Hi Cameron,

take a look at the wiki: Smile
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 Smile

Greets,
McSod
_________________
Grüzi, Smile
Christoph

My sweet home: www.webboarder.de
Do not visit!! It is private!! And it's mine!
Back to top
View user's profile Send private message Visit poster's website
core2
Smarty n00b


Joined: 21 Jan 2005
Posts: 4

PostPosted: Mon Apr 03, 2006 1:04 pm    Post subject: Another solution for titles with font is SIFR Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP