Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update docs

  • Loading branch information...
commit 38754d290aa5615ababd0517409ac0b8235f4a4a 1 parent fb414a4
@rcarver rcarver authored
Showing with 29 additions and 15 deletions.
  1. +15 −9 README.md
  2. +12 −4 docs/MODULES.md
  3. +2 −2 docs/TRANSITIONS.md
View
24 README.md
@@ -5,12 +5,15 @@ WebFont Loader gives you added control when using linked fonts via
the source, then adds a standard set of events you may use to control the
loading experience.
+
## Get Started
+(These samples use WebFont Loader hosted on [Google's AJAX APIs][gajax].)
+
Link to the WebFont Loader library, then tell it which fonts to load. Here we'll
-load fonts from Google.
+load fonts from [Google's Font API][gfontapi].
- <script src="http://ajax.googleapis.com/ajax/libs/webfont/1.0.0/webfont.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
<script>
WebFont.load({
google: {
@@ -21,7 +24,7 @@ load fonts from Google.
Alternatively, load fonts from Typekit. Just specify your Kit ID.
- <script src="http://ajax.googleapis.com/ajax/libs/webfont/1.0.0/webfont.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
<script>
WebFont.load({
typekit: {
@@ -40,10 +43,11 @@ 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 src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
<script>
WebFont.load({
google: {
- family: ['Droid Sans']
+ families: ['Droid Sans']
}
});
</script>
@@ -98,8 +102,10 @@ Browse the demos [source code][demos].
WebFont Loader is released under the [Apache 2.0][lic] license.
-[mod]: http://github.com/typekit/webfontjs/blob/master/docs/MODULES.md
-[trn]: http://github.com/typekit/webfontjs/blob/master/docs/TRANSITIONS.md
-[evt]: http://github.com/typekit/webfontjs/blob/master/docs/EVENTS.md
-[lic]: http://github.com/typekit/webfontjs/blob/master/LICENSE
-[demos]: http://github.com/typekit/webfontjs/blob/master/lib/webfontjs/demo/public
+[mod]: http://github.com/typekit/webfontloader/blob/master/docs/MODULES.md
+[trn]: http://github.com/typekit/webfontloader/blob/master/docs/TRANSITIONS.md
+[evt]: http://github.com/typekit/webfontloader/blob/master/docs/EVENTS.md
+[lic]: http://github.com/typekit/webfontloader/blob/master/LICENSE
+[demos]: http://github.com/typekit/webfontloader/blob/master/lib/webfontloader/demo/public
+[gfontapi]: https://code.google.com/apis/webfonts/
+[gajax]: http://code.google.com/apis/ajax/
View
16 docs/MODULES.md
@@ -3,16 +3,19 @@
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
Using Google's Font API, name the font families you'd like to load.
WebFont.load({
google: {
- family: ['Droid Sans', 'Droid Serif']
+ families: ['Droid Sans', 'Droid Serif']
}
});
+Learn more about the [Google Font API][gfontapi].
+
## Typekit
@@ -25,11 +28,13 @@ ID within Typekit's Kit Editor interface.
}
});
-
+Learn more about [Typekit][tk].
+
+
## Custom
To load fonts from any external stylesheet, use the `custom` module. Here you'll
-need to specify both the url of the stylesheet as well as the font families it
+need to specify both the url of the stylesheet as well as the font families it
provides.
WebFont.load({
@@ -38,4 +43,7 @@ provides.
urls: ['/fonts.css']
}
});
-
+
+
+[gfontapi]: https://code.google.com/apis/webfonts/docs/getting_started.html
+[tk]: http://typekit.com/
View
4 docs/TRANSITIONS.md
@@ -19,7 +19,7 @@ You can get started with web fonts quickly and easily by just using Google.
<script type="text/javascript">
WebFont.load({
google: {
- family: ['Droid Sans']
+ families: ['Droid Sans']
}
});
</script>
@@ -35,7 +35,7 @@ to add fonts from Typekit.
<script type="text/javascript">
WebFont.load({
google: {
- family: ['Droid Sans']
+ families: ['Droid Sans']
},
typekit: {
id: 'abc1def'
Please sign in to comment.
Something went wrong with that request. Please try again.