Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Font Replacement With typeface.js / cufon

Featured Replies

Hi everyone,

 

I have only just come across typeface.js and cufon as options for text replacement. They seem pretty cool. Are there any major drawbacks (aside from needing javascript enabled).

 

Is it possible to style the elements alternatively with CSS as well (so that if JS is turned off, you can get it to degrade semi-gracefully with other fonts)?

 

Cheers!

 

Martin

As far as I know you just code a cross-browser font-family like arial or sans-serif in the body style (or a div style) and that's what shows if Javascript is disabled.

 

Some alternatives here:-

http://www.dezinerfolio.com/2009/03/31/dynamic-font-replacement-solutions

but few comments on how they work but if you click a blue name it will take you to the website where some have a forum and knowledge base.

 

typeface.js says Supported browsers include Firefox 1.5+, Safari 2+, and Internet Explorer 6+. Things will degrade gracefully for other browsers. Users browsing with their PDA's, for example, will still see your text there--it just won't be quite as pretty. Search engines will see your graphic text now too, without having to rely on OCR or "alt" properties.

  • Author

Thanks! Looking through the options available, javascript font replacement seems to be the best all-round solution (especially for navigation/headings etc, where text-selection isn't such an issue).

 

I wonder if there is a way to add security (so people can't download the JS file and use it themselves) by having the javascript in a PHP file in a

 

if(defined('BASEPATH')) {

}

 

block to ensure that only index.php (or whatever) can access it.

 

M

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.