Skip to content

Commit

Permalink
New option: autoDetect. Allows you to specify font-family in your CSS…
Browse files Browse the repository at this point in the history
… instead of using the fontFamily option. Does NOT work in Opera, disabled by default.
  • Loading branch information
sorccu committed Aug 26, 2009
1 parent 28fff6b commit 0dbf202
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/cufon.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ var Cufon = (function() {
var initialized = false;

var engines = {}, fonts = {}, defaultOptions = {
autoDetect: false,
enableTextDecoration: false,
engine: null,
//fontScale: 1,
Expand Down Expand Up @@ -699,6 +700,7 @@ var Cufon = (function() {
initialized = true;
}
if (options.hover) options.forceHitArea = true;
if (options.autoDetect) delete options.fontFamily;
if (typeof options.textShadow == 'string')
options.textShadow = CSS.textShadow(options.textShadow);
if (typeof options.color == 'string' && /^-/.test(options.color))
Expand Down

0 comments on commit 0dbf202

Please sign in to comment.