Words from Alejandro U. Alvarez
sIFR – Use custom fonts in your website safely
UPDATE: The sIFR WordPress plugin is now available!
This is probably one of the most amazing scripts I've seen nowadays. It was developed by Mike Davidson and Mark Wubben, and what it does is it allows you to change the fonts used in your website to custom fonts without having to worry about them changing in the user's computer.
How this is accomplished is actually very simple. First of all you need a folder with all your fonts (.ttf files), then a JavaScript file has to be called from your html pages which will first check if Flash is enabled, and then if it is it will read through the code and determine where it should insert the flash movies.
Those flash movies take the font you selected and the text that the script found and create a static "animation" with the same text and size but with the new font. Since they are overlayed exactly over the original text, no change is noticed.
The only thing I'm afraid won't work fine is the background color. If you have a solid background it will work perfectly probably, but what if you use a textured background, like I do in this blog? I haven't tested it yet, but their test page works perfectly on solid backgrounds...
As a piece of advice don't over-use it, it is intended only for headlines, quotes, and other small bits of text.
Visit sIRF's homepage for more information on this subject
Visit their demo page
Future planning
Right after I found this tool I thought to my self, "I have to create a WP plugin that will automatically change selected tags or ids to themed fonts!". So well, I am developing now the plugin.
I started today so I guess it will take me no longer that this Sunday. I have about three days, considering that here in Spain we are on holidays... Yea I know, Spain is always on holidays
So that is pretty much it, I'll keep on posting about the plugin status, and if you want me to notify you simply post a comment saying so and when I'm done I'll email you
Enjoy sIFR!
| Print article | This entry was posted by alex on May 1, 2008 at 8:59 pm, and is filed under Javascript, PHP, Plugin development, Programming, Web-related, WordPress. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
JW Player Captions
about 3 months ago - No comments
Captions are a great way to offer multi-lingual media content on your site, but they don’t seem easy to add right? Well with the right tools and guidance, it will be very easy:
Setting everything up:
In order for captions to work flawlessly on every major browser, we will be using JW Player version 4.5 (At the More >
iPhone web development [Part 2]
about 3 months ago - No comments
In part one of my tutorial on iPhone web development, we talked about the basic stuff (Recognizing iPhones or iPods, setting up special HTML and CSS tags… ) we will now move on to the really clever bit: Orientation detection.
For many sites, we may just have the same thing both on portrait and landscape. But More >
Play a sound via JavaScript
about 4 months ago - 1 comment
Working in a project recently I found myself in the need of playing a sort of “alert” sound with JavaScript. It turns out there are not so many good options out there. The first thing that came to my mind was to use an embed and the Play and Stop JavaScript controls.
Well that only works More >
Our of the oven Flash Templates:
about 10 months ago - No comments
I was building a site for a relative new company a couple weeks ago, and they wanted “A professional looking, brilliant display” for their products, I know Flash, and can do decent stuff with it, but seriously, how long does it take to do something really cool?
So I headed to the only place where I More >
Perfect jQuery UI rotating tabs
about 10 months ago - 1 comment
Tabs are nice. They create a very elegant interface, and jQuery UI does this marvelously, here we have a little preview of this:
How to do that?
Include the files
With jQuery and jQuery UI it is dead simple. First, load the JS libraries, I recommend using the hosted files at Google for jQuery:
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="path/to/jquery UI" More >
New threat for all Joomla and WordPress installations
about 11 months ago - 3 comments
There is a new BOT out there, and one of the bad ones. I have started receiving traffic from it in my servers over the past week, and after some investigation it turns out it is quite a powerful bot, and so simple to use even a kid with a computer could use it.
The bot More >
Calculate age in PHP from timestamp
about 12 months ago - No comments
If you ever wanted to calculate someone’s age in PHP from a birth timestamp, you must take into account that the age is more than the number of years, since days and months are also important, so I wrote a simple function that will return the exact age for a given timestamp:
function getAge($birth){
$t = time();
$age More >
Easiest PHP file upload
about 1 year ago - No comments
Hello people,
I want to share with all of you a file upload class I have developed, that makes it stupid simple to upload files haha
The PHP class:
First of all, here is the PHP class you will need:
< ?php
//Uploader class, by Alex
// This class is meant to handle all kinds of file uploads for DJs Music
// More >
Bypass/Flash BIOS password:
about 1 year ago - No comments
Have you ever tried to access a computer’s BIOS settings to find they are protected? Or maybe it was you and forgot the password. Either way don’t worry since bypassing this simple password is as simple as following the following solutions:
Solution 1
The simplest solution, although it may not work on some computers. This solution is More >
about 2 years ago
Sweet fancy Moses! A WP plugin for this functionality would be absolutely fantastic! (And would be IMMENSELY successful.) Best of luck with that and keep us posted on your progress!
about 2 years ago
Thanks!
I’ve already started with the development and I think I should have a working version by this Friday, I’ll need some testing and feedback before official release, so if you want you could help me with that.
I’ll post an article asking for volunteers to test it when I’m done!
about 2 years ago
Интересно написано. Даже за душу берет, заставляет поразмышлять над собственным блогом. С уважением, Елена.
about 2 years ago
it looks like a nice site, but it would better with multi language support, for example spanish.. but thanks..
about 2 years ago
The main website is in both Spanish and English, but I don´t have enough time to publish every article in both languages. If you have a blog and want to publish translated articles feel free to do so, I would appreciate it a lot.
Thanks for the interest!
about 1 year ago
it would be better with other languages support, but thanks..