Monday, June 05, 2006

SIFR Alternative - Update

I have posted the latest build of my heading replacement library at http://labs.tom-lee.com/HeadingReplacement/. This build includes numerous performance tweaks, a couple of bug fixes, and a major change to the element selection methodology.

First off, I fixed Ian's bug, where some headings scrolled when highlighted by dragging the mouse. Secondly, I have greatly refined the process by which you specify which heading elements will be replaced, and in the process provided support for multiple fonts. Here's how it works:

1) Specify the path to your fonts in a css font or font-family declaration. Paths must be in double or single quotes:

h1{
font-family:"Swf/FranklinGothicBook.swf", Helvetica, sans-serif;
}


Note that the font lists still work: if you don't include the JS library, the CSS selector behaves as you'd expect it to, and you'd get Helvetica. Also, inheritance works the way you'd expect it to, and you can override the declaration later in the style sheet or in an inline style.

I really like this approach because it allows me to specify fonts where style information should be specified (in STYLE sheets), and it does not require a lot of JavaScript overhead for the purpose of parsing CSS selectors. The swf path is merely passed along in the computed style of the element. Sadly, there is no way I know of to make this approach work in Opera, as it does not support document.styleSheets and it does not pass along the swf path from the font declaration. So, I'm making a decision at this point that I will not make any further efforts to be compatible with Opera. I think it's a safe bet that the few people who do use Opera will not miss the smooth fonts, since the pages will gracefully degrade to normal web text anyway.

My next steps will include tweaking the swf path stuff. Presently, you specify FontName.swf and the parser changes that to FontNameV6.swf and FontNameV8.swf, both of which must be on your server. I'd like to come up with something cleaner, more of a single font package that would work for both version 6 and 8. Also, I have some performance tuning to do in terms of decreasing the number of function calls that are made between the swf files and the JavaScript. I may try to create some kind of automatic switching between a high-performance and low-performance mode.

As always, let me know what you think of the demo!

Was this post helpful to you? If so, please consider making a small donation to keep this blog going.

8 Comments:

Anonymous Anonymous said...

Still looking good. Any indication as to when you're going to make this available for download?

6:35 AM  
Blogger tom said...

I'm not exactly sure, as I still have a number of things I want to finish up. It's definitely a matter of weeks, not months. Thanks for the interest!

10:02 AM  
Anonymous Anonymous said...

Hey Tom, I ran into the scrolling when selecting problem as well, would you mind sharing the fix? :)

Also, you've got some good Flash related content here, keep it up!

11:52 AM  
Anonymous Anonymous said...

Tom please release this! sifr 3 is so painful. Not so much in the capabilities but more so in having to use various files to format the headings. It gets confusing at times and I'm *loving* how you've implemented it being handled directly in the css. Please email me if needed, I would love to use it on a high profile site. Thanks!

info (at) shanethacker.com

2:01 PM  
Anonymous Anonymous said...

Please pick this up again. There aren't any good SIFR-alternatives at all except yours... but it's a bit outdated unfortunately. :/

7:18 AM  
Anonymous Anonymous said...

One reason not to use Flash-based text headlines is that they do not print well - you get your 72dpi instead of the 600 or 1200 dpi you expect. This is really a problem of browsers that just do not know how to print flash properly.

2:06 PM  
Blogger Unknown said...

I've created an alternative to sIFR that someone might find useful at http://facelift.mawhorter.net/

It doesn't use flash (but does require PHP/gd). Check it out.

9:25 AM  
Anonymous Anonymous said...

情趣用品,情趣用品,情趣用品,情趣用品,情趣,情趣,情趣,情趣,按摩棒,震動按摩棒,微調按摩棒,情趣按摩棒,逼真按摩棒,G點,跳蛋,跳蛋,跳蛋,性感內衣,飛機杯,充氣娃娃,情趣娃娃,角色扮演,性感睡衣,SM,潤滑液,威而柔,香水,精油,芳香精油,自慰套,自慰,性感吊帶襪,吊帶襪,情趣用品加盟AIO交友愛情館,情人歡愉用品,美女視訊,情色交友,視訊交友,辣妹視訊,美女交友,嘟嘟成人網,成人網站,A片,A片下載,免費A片,免費A片下載愛情公寓,情色,舊情人,情色貼圖,情色文學,情色交友,色情聊天室,色情小說,一葉情貼圖片區,情色小說,色情,色情遊戲,情色視訊,情色電影,aio交友愛情館,色情a片,一夜情,辣妹視訊,視訊聊天室,免費視訊聊天,免費視訊,視訊,視訊美女,美女視訊,視訊交友,視訊聊天,免費視訊聊天室,情人視訊網,影音視訊聊天室,視訊交友90739,成人影片,成人交友,美女交友,微風成人,嘟嘟成人網,成人貼圖,成人電影,A片,豆豆聊天室,聊天室,UT聊天室,尋夢園聊天室,男同志聊天室,UT男同志聊天室,聊天室尋夢園,080聊天室,080苗栗人聊天室,6K聊天室,女同志聊天室,小高聊天室,上班族聊天室,080中部人聊天室,同志聊天室,聊天室交友,中部人聊天室,成人聊天室,一夜情聊天室,情色聊天室,寄情築園小遊戲情境坊歡愉用品,情趣用品,成人網站,情人節禮物,情人節,AIO交友愛情館,情色,情色貼圖,情色文學,情色交友,色情聊天室,色情小說,七夕情人節,色情,情色電影,色情網站,辣妹視訊,視訊聊天室,情色視訊,免費視訊聊天,美女視訊,視訊美女,美女交友,美女,情色交友,成人交友,自拍,本土自拍,情人視訊網,視訊交友90739,生日禮物,情色論壇,正妹牆,免費A片下載,AV女優,成人影片,色情A片,成人論壇,情趣,免費成人影片,成人電影,成人影城,愛情公寓,成人影片,保險套,舊情人,微風成人,成人,成人遊戲,成人光碟,色情遊戲,跳蛋,按摩棒,一夜情,男同志聊天室,肛交,口交,性交,援交,免費視訊交友,視訊交友,一葉情貼圖片區,性愛,視訊,視訊聊天,A片,A片下載,免費A片,嘟嘟成人網,寄情築園小遊戲,女同志聊天室,免費視訊聊天室,一夜情聊天室,聊天室

10:35 AM  

Post a Comment

<< Home