Kategorije:


09.04.2007.

sIFR - font, html, flash, css
Lokacija: CSS :: Javascript :: Zanimljivi linkovi :: HTML :: Flash   |   Autor: cacan @ 20:55   |  

Kako staviti bilo koji font na web, poštivajući standarde?

Odgovor: sIFR

sIFR is meant to replace short passages of plain browser text with text rendered in your typeface of choice, regardless of whether or not your users have that font installed on their systems. It accomplishes this by using a combination of javascript, CSS, and Flash. Here is the entire process:

1. A normal (X)HTML page is loaded into the browser.
2. A javascript function is run which first checks that Flash is installed and then looks for whatever tags, ids, or classes you designate.
3. If Flash isn’t installed (or obviously if javascript is turned off), the (X)HTML page displays as normal and nothing further occurs. If Flash is installed, javascript traverses through the source of your page measuring each element you’ve designated as something you’d like “sIFRed".
4. Once measured, the script creates Flash movies of the same dimensions and overlays them on top of the original elements, pumping the original browser text in as a Flash variable.
5. Actionscript inside of each Flash file then draws that text in your chosen typeface at a 6 point size and scales it up until it fits snugly inside the Flash movie.

This all happens in a split-second, so all of the checking, replacing, and scaling is not visible to the user. It is not uncommon to notice a very short delay as the Flash loads, but to the user, none of the internals of this process are exposed.





Vezani blogovi:
  • Free flash image gallery viewer - odlicno!
  • MakaiMedia.com - flash igrice
  • Neodelight.com - online Flash games - flash igre - igrice
  • dncCoop.com - How much is your site worth?
  • Flash MP3 Player
  • Urban Fonts + FontLoader
  • Flash igrice i filmovi - www.newgrounds.com






  • Was this article helful to you? If so, please click on the (+) [plus] sign below! It's Croatian digg ;-) Tnx!


       4 korisnika online   
    April 2007
    S M T W T F S
    « Mar   May »
    1234567
    891011121314
    15161718192021
    22232425262728
    2930  
    Za korisnike:

    33 queries. 0.137 seconds. Powered by Blog385.com