Typeface with font-weight: bold
As a web developer knows, the problem with commercial fonts that are from the corporate design, but not as web fonts are available. Popular this are always different forms of image replacements. The disadvantages of this are obvious:
- No optimal Suchmaschinerkennung
- High amendments and administrative expenses
- Text is not copyable
- Problem of accessibility
Besides the pictures solution would sIFR be a known method. Here is the text of a specific HTML tag is read and replaced by a Flash movie with embedded font. good in theory, in practice extremely difficult due to a high configuration effort.
Following the same principle works in the js-plugin Typeface . Only it is more practical to use.
The following code binds a normal font and a later described Bold font:
1 2 3 | "typeface-0.14.js" ><!-- mce : 0 --></ script > < script src = "mysrcFont.typeface.js" ><!-- mce : 1 --></ script > < script src = "mysrcFontBold.typeface.js" ><!-- mce : 2 --></ script > <Script src = "typeface-0.14.js" ><!-- mce: 0 --></ script> <script src = "mysrcFont.typeface.js" ><!-- mce: 1 --></ script> <script src = "mysrcFontBold.typeface.js" ><!-- mce: 2 --></ script> |
To the text zuzuweißen the appropriate font, you just use the CSS font-family statement.
1 2 | <div id="text" style="font-family: mySrc Font;"> Lorum ipsolum ...</ div> |
The name of the attribute in the syle used fonts can be read in each of the js files.
All this has two disadvantages, as described on the site are already well. Performance problems with larger amounts of text and standard CSS Hovereffekte not work anymore.
This will be converted into a javascript file in the Font Truetype or Opentype format it one must exist. Not always in these writings, the bold version is integrated. In order to get a grip, you can export a font editing tool, only the Bold version and convert them as well. Adds one now these two JS files and assigns the Bold font a an HTML element that happened apart from an error output to the Firebug console, nothing.
The solution is simple. The font converter on the integrated Typeface website also provides information on typefaces why the CSS selector that info also needed:
1 2 3 4 5 6 7 8 | # Text ( mySrc Font , Verdana , Arial ; font-family: mySrc font, Verdana, Arial; ) # (BoldFont mySrc Boldfont , Verdana , Arial ; font-family: mySrc Boldfont, Verdana, Arial; bold ; font-weight: bold; ) |
So the workaround for the embedding of normal and bold fonts is perfect.
An alternative to sIFR javascript Cufón -
sIFR 3 r436 - scrolling problem in Firefox 3, ie6 / 7











Recent Comments