📜 ⬆️ ⬇️

Downloadable fonts in HTML - a dream or a reality?

Many would agree that the standard Arial, Times, Verdana, etc. often not enough.
This is where the css @ font-face rule should come to the rescue, which allows you to use your font. But unfortunately there is no normal browser support. You can use http://www.alistapart.com/d/cssatten/stef.html as a test.

I only earned in Safari 3.1.
Safari @ font-face

IE6, FF2, Opera 9.26 - did not pass the test.
IE6, FF2, Opera 9.26 @ font-face

Let's consider the possible options without using this rule.

sIFR 2.0: Scalable Inman Flash Replacement

IFR logo
sIFR offers us an alternative. The necessary HTML text elements are replaced with JavaScript using CSS blocks in Flash, with the right font.
Among the shortcomings, it is necessary to note the need to convert the required ttf to swf and use flash (although the project uses version 6.0, which by default comes with Windows XP)
Read more in Russian (Habr)
sIFR plugin for jQuery
Description in English
Demo
Download sIFR 2.0.2
')

Sistr - sIFR replacement on Silverlight


Absolute analogue of the first project, only written using technology from Microsoft.
The project is new, so there are many more flaws and bugs. The biggest, in my opinion, is the use of Silverlight itself, which is practically not common.
Project page
Demo
Download sistr.js

PHP + Javascript Image Replacement


Unlike the previous two players using transformations on the client, this is a server technology that replaces the specified tags with images with entered text.
Just write the following javascript code
replaceSelector ("h2", "ifr.php", false);
and all h2 tags are replaced with png images with arbitrary font text, which are specified in ifr.php
The page is in English , there is an example at the bottom of the page
Download PHP + Javascript Image Replacement

Source: https://habr.com/ru/post/25848/


All Articles