entry title as image in custom fonts - possible?

Skinning and designing Serendipity (CSS, HTML, Smarty)
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

entry title as image in custom fonts - possible?

Post by snafu »

hi folks,

not really an urgent problem, but: just solving a problem for disabled users with the captchas
http://www.s9y.org/forums/viewtopic.php ... ht=captcha
i had an idea:

typo 3 allows to have text on the side as graphics generated via php.

i would like to have the entry titles in my custom font, say comic sans (uh, not really a font :-)
do you have links for code snippets to include this into s9y? i think, that should work using smarty and a bit php ... ?!

tnx!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: entry title as image in custom fonts - possible?

Post by garvinhicking »

Hi!

RobA on the forums posted code for this, maybe you can search it up. :)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

If you find it, let me know; I want to add it to the Serendipity Expert.
Judebert
---
Website | Wishlist | PayPal
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Re: entry title as image in custom fonts - possible?

Post by snafu »

garvinhicking wrote: RobA on the forums posted code for this, maybe you can search it up. :)
thanks a lot,

just found it here:

http://ffaat.pointclark.net/blog/archiv ... mages.html

edit:
cool - works!
http://blogmich.de/provisorium/
(ten minutes :-)
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

It would be awesome if someone could turn Rob's fix into an event plugin.

Nudge nudge, wink wink...

Carl
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Post by snafu »

You will find the tested php snippet (generating images out of text in special fonts on the fly) and an pdf from RobA's Website here:
http://blogmich.de/provisorium/dyn_images.zip

(Of course there are two major drawbacks of this solution: blind people will not be able to read the text, and search engine wont either)
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

The obvious solution to accessibility would be to ensure an alt tag was added to the image. If the alt tag was identical to the entry title then some form of accessibility would still be satisfied.

Alternatively, add some smarty to determine the browser, and if the browser is one of the text-only browsers used by blind people then disable the plugin.

Also, remember one other factor in accessibility, most of the templates available (tables based templates) for serendipity aren't compliant, so adding a plugin of this type with one of those templates wouldn't make much difference.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Post by yellowled »

carl_galloway wrote:The obvious solution to accessibility would be to ensure an alt tag was added to the image. If the alt tag was identical to the entry title then some form of accessibility would still be satisfied.
Fahrner Image Replacement would also be an alternative.
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Its a solid technique, well supported by the browsers, and in fact I've just used it (but without the dynamic image generation) for another user who requested a template from me. If anyone was to convert Rob's code into a plugin, then it would need its own stylesheet but I would be really keen to see this developed.

Do we have any takers?
mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 9:35 pm
Location: Wiesbaden, Germany
Contact:

Post by mattsches »

YellowLed wrote:Fahrner Image Replacement would also be an alternative.
I'm using Mike Davidson's sIFR (Scalable Inman Flash Replacement) for my headers. The solution is based on Javascript, Flash, and CSS. In short, the header text is replaced by a small Flash object; you can still select the letters with your mouse (e.g. in order to copy text).

I'm using an older version of the script, and it took me quite some time to fiddle with all the options and stuff until and worked more or less decently. but I like the solution because it also works with JS disabled, and search engines are still able to read the text.

Regards,
- Mattsches
azel
Regular
Posts: 265
Joined: Thu Apr 21, 2005 4:28 am
Contact:

Post by azel »

Is it also possible to create dynamic images for the beginning of a paragraph?

I would definitely like to see the dynamic image titles as a plugin. Those look pretty dern nifty.
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

The technique that mattsches uses is a fantastic technique and works incredibly well. In another thread, a user asked if it was possible to port a wordpress theme that used this technique. A plugin based on this technique would be so much better than just porting one template but the downside is that the user would have to have some way of including their preferred font in a .swf file that the flash player could use to create the titles.

If someone was to create a plugin using this technique and then also bundle a few fonts that could be used, this could be a winner, and definitely is more accessible than just relying on the alt tag.

@mattsches and @snafu, since you guys have already dabbled with php files and are probably ahead of the rest of us in understanding how to integrate these into Serendipity, could we ask if you guys could try to come up with a plugin? I would use it straight away, and so would azel, and probably thousands of other users. Pleeeeaaaasse...
snafu
Regular
Posts: 108
Joined: Sat Dec 17, 2005 7:34 am

Post by snafu »

carl_galloway wrote: @mattsches and @snafu, since you guys have already dabbled with php files and are probably ahead of the rest of us in understanding how to integrate these into Serendipity
i'm just an copy - and - paste - programmer, no more, sorry...

maybe a plugin is not really necessary, cause this is really easy to integrate into an template...
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Post by yellowled »

snafu wrote:maybe a plugin is not really necessary, cause this is really easy to integrate into an template...
I might look easy to you and everybody else who has ever edited .tpl files and stuff like that, but there's a whole community of users out there who do not want to (or should, for that matter) edit .tpl files. Ever.

Some people are just not that into editing their own templates. Those - let's call them 'non-expert' - users would probably like a nice little plugin to use within the admin frontend.
mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 9:35 pm
Location: Wiesbaden, Germany
Contact:

Post by mattsches »

IIRC, I was pretty happy when I got it to work, not only because I have only limited knowledge in Flash, but also because it's quite difficult to correctly scale the text in different browsers. But I can give it a try (i.e. re-read the docs and the code on my site), if you want. As I said, it's been quite some time since I looked at it. OTOH, they improved the docs and provide some tests for sIFR, so that should help :)

So ... since it is not possible to dynamically include fonts into the Flash files, we need to bundle a handful .swf files with the plugin. Thus, first of all, we need fonts. Besided looking good, these fonts should: be free to use (copyright!), include as many special chars as possible (umlauts, punctuation and stuff), be compatible with Flash (don't know if Flash takes only .ttf or what?), ...

Please go ahead and suggest fonts. Gerrit's collection might be a good starting point, at least for all who know German. After we've collected enough, I'll leave it to our design gurus to choose the best :wink:

- Mattsches
Post Reply