Permalink
Browse files

update name in docs

  • Loading branch information...
1 parent c9c1697 commit 11364cca2c6e52d2273d1480caacf2153d68fd53 @rcarver rcarver committed May 14, 2010
Showing with 44 additions and 36 deletions.
  1. +13 −10 README.md
  2. +5 −4 docs/EVENTS.md
  3. +1 −1 docs/MODULES.md
  4. +21 −17 docs/TRANSITIONS.md
  5. +3 −3 lib/webfontjs/demo/public/index.html
  6. +1 −1 src/typekit/typekit_script.js
View
@@ -1,12 +1,13 @@
-# WebFont JS
+# WebFont Loader
-WebFont JS gives you added control when using linked fonts via `@font-face`.
-It provides a common interface to loading fonts regardless of the source, then
-adds a standard set of events you may use to control the loading experience.
+WebFont Loader gives you added control when using linked fonts via
+`@font-face`. It provides a common interface to loading fonts regardless of
+the source, then adds a standard set of events you may use to control the
+loading experience.
## Get Started
-Link to the WebFont JS library, then tell it which fonts to load. Here we'll
+Link to the WebFont Loader library, then tell it which fonts to load. Here we'll
load fonts from Google.
<script src="http://ajax.googleapis.com/ajax/libs/webfont/1.0.0/webfont.js"></script>
@@ -35,8 +36,9 @@ Learn more about the
## Do More
-WebFont JS gives you control over how fonts are loaded. If you're frustrated
-by the "flash of unstyled text" typically seen in FireFox, try this.
+WebFont Loader gives you control over how fonts are loaded. If you're
+frustrated by the "flash of unstyled text" typically seen in FireFox, try
+this.
<script>
WebFont.load({
@@ -64,8 +66,9 @@ Learn more about [events][evt].
## A common ground
-WebFont JS aims to provide a common interface for font loading. Today it works
-with Google, Typekit, and your own CSS. Learn more in [transitions][trn].
+WebFont Loader aims to provide a common interface for font loading. Today it
+works with Google, Typekit, and your own CSS. Learn more in
+[transitions][trn].
## More to see
@@ -92,7 +95,7 @@ Browse the demos [source code][demos].
## License
-WebFont JS is released under the [Apache 2.0][lic] license.
+WebFont Loader is released under the [Apache 2.0][lic] license.
[mod]: http://github.com/typekit/webfontjs/blob/master/docs/MODULES.md
View
@@ -1,7 +1,8 @@
# Events
-WebFont JS provides an event system that developers can hook into. It gives
-you notifications of the font loading sequence in both CSS and JavaScript.
+WebFont Loader provides an event system that developers can hook into. It
+gives you notifications of the font loading sequence in both CSS and
+JavaScript.
## The Events
@@ -64,13 +65,13 @@ event will be triggered, else the `Inative` even will be triggered.
Every web browser has varying levels of support for fonts linked via
@font-face.
-> If WebFont JS determines that the current browser does not support
+> If WebFont Loader determines that the current browser does not support
`@font-face`, the `Inactive` event will be triggered.
When loading fonts from multiple providers, each provider may or may not
support a given browser.
-> If WebFont JS determines that the current browser can support
+> If WebFont Loader determines that the current browser can support
`@font-face`, and *at least* one provider is able to serve fonts,
the fonts from that provide will be loaded. When finished, the `Active` event
will be triggered.
View
@@ -1,6 +1,6 @@
# Modules
-WebFont JS provides a generic module system so that any web font provider
+WebFont Loader provides a generic module system so that any web font provider
may be used. The specifics of each provider are documented here.
## Google
View
@@ -1,8 +1,8 @@
# Transitions
-In order to support smooth transitions between webfont providers, WebFont JS
-provides a common interface to each provider. It also makes it trivial to load
-fonts from multiple providers.
+In order to support smooth transitions between webfont providers, WebFont
+Loader provides a common interface to each provider. It also makes it trivial
+to load fonts from multiple providers.
This is especially powerful when building your page against the [events][]
because the same events are triggered regardless of the provider.
@@ -11,7 +11,7 @@ Here are a few scenarios.
## From Google Fonts to Typekit
-### Step 1: Use Google with WebFont JS
+### Step 1: Use Google with WebFont Loader
You can get started with web fonts quickly and easily by just using Google.
@@ -29,15 +29,17 @@ You can get started with web fonts quickly and easily by just using Google.
If you discover that Google doesn't have your preferred typeface, you may wish
to add fonts from Typekit.
-(first sign up Typekit, adds font and retrieve your Kit ID)
+(first sign up for Typekit, add fonts and retrieve your Kit ID)
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
WebFont.load({
google: {
family: ['Droid Sans']
},
- typekit: 'abc1def'
+ typekit: {
+ id: 'abc1def'
+ }
});
</script>
@@ -51,16 +53,18 @@ Google has, let's drop that dependency.
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
- WebFont.load({
- typekit: 'abc1def'
+ WebFont.load({,
+ typekit: {
+ id: 'abc1def'
+ }
});
</script>
-### Step 4: Remove WebFont JS
+### Step 4: Remove WebFont Loader
-You may wish to reduce HTTP requests further by dropping the dependency on the
-WebFont API and work directly with Typekit. Typekit's API is fully compatible
-with WebFont JS.
+You may wish to reduce HTTP requests further by dropping the dependency on
+WebFont Loader to work directly with Typekit. Typekit's API is fully
+compatible with WebFont Loader.
<script type="text/javascript" src="http://use.typekit.com/abc1def.js"></script>
<script type="text/javascript">
@@ -84,18 +88,18 @@ already be using them in your page.
<link type="text/css" rel="stylesheet" href="/fonts.css">
-### Step 2: Use WebFont JS
+### Step 2: Use WebFont Loader
-To add [events][] support, use the `default` module to load your stylesheet,
+To add [events][] support, use the `custom` module to load your stylesheet,
and name the font families that the stylesheet provides.
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
WebFont.load({
default: {
- families: ['My Font'],
- urls: ['/fonts.css']
- }
+ families: ['My Font'],
+ urls: ['/fonts.css']
+ }
});
</script>
@@ -3,7 +3,7 @@
<head>
</head>
<body>
- <h1>WebFont JS Demos</h1>
+ <h1>WebFont Loader Demos</h1>
<p>
Demonstrations of pure CSS and JavaScript-enhanced use of @font-face.
</p>
@@ -21,7 +21,7 @@
<h2>JavaScript Enhanced</h2>
<ol>
- <li><a href="/js-basic.html">Basic</a>: Simplest font embedding with WebFont JS.</li>
+ <li><a href="/js-basic.html">Basic</a>: Simplest font embedding with WebFont Loader.</li>
<li><a href="/js-css-active.html">Show when rendered (CSS)</a>: Use CSS to show part of the page only when the font has rendered. (Webkit style)</li>
<li><a href="/js-js-active.html">Show when rendered (JS)</a>: Use JS to show part of the page only when the font has rendered. (Webkit style)</li>
<li><a href="/js-css-inactive.html">Fallback before rendered (CSS)</a>: Use CSS to show fallback font before the font has rendered. (Mozilla style)</li>
@@ -38,7 +38,7 @@
<h2>IE Behavior</h2>
<ol>
<li><a href="/ie-slow-link.html">Slow Link</a>: Demonstrate that IE blocks the whole page when loading fonts via a LINK tag.</li>
- <li><a href="/ie-fast-js.html">Fast JS</a>: By default, WebFont JS works around the default IE loading behavior.</li>
+ <li><a href="/ie-fast-js.html">Fast JS</a>: By default, WebFont Loader works around the default IE loading behavior.</li>
<li><a href="/ie-slow-js.html">Slow JS</a>: Restore the default IE loading behavior.</li>
</ol>
@@ -19,7 +19,7 @@ webfont.TypekitScript.prototype.supportUserAgent = function(userAgent, support)
var self = this;
if (kitId) {
- // Provide WebFont JS data to Typekit for processing.
+ // Provide data to Typekit for processing.
if (!this.global_[webfont.TypekitScript.HOOK]) {
this.global_[webfont.TypekitScript.HOOK] = {};
}

0 comments on commit 11364cc

Please sign in to comment.