Web Font Loader

  Home  Client Side Scripting  Web Font Loader


“Web Font Loader frequently Asked Questions by expert members with experience in Web Font Loader. These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts”



6 Web Font Loader Questions And Answers

1⟩ Who owns Web Font Loader?

Web Font Loader Copyright (c) 2010 Adobe Systems Incorporated, Google Incorporated.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

 198 views

2⟩ Explain about Web Font Loader Browser Support?

Every web browser has varying levels of support for fonts linked via @font-face. Web Font Loader determines support for web fonts is using the browser's user agent string. The user agent string may claim to support a web font format when it in fact does not. This is especially noticeable on mobile browsers with a "Desktop" mode, which usually identify as Chrome on Linux. In this case a web font provider may decide to send WOFF fonts to the device because the real desktop Chrome supports it, while the mobile browser does not. The Web Font Loader is not designed to handle these cases and it defaults to believing what's in the user agent string. Web font providers can build on top of the basic Web Font Loader functionality to handle these special cases individually.

 184 views

3⟩ How to use Web Font Loader?

To use the Web Font Loader library, just include it in your page and tell it which fonts to load. For example, you could load fonts from Google Fonts using the Web Font Loader hosted on Google Hosted Libraries using the following code.

<script src="//ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js"></script>

<script>

WebFont.load({

google: {

families: ['Droid Sans', 'Droid Serif']

}

});

</script>

 188 views

4⟩ Web Font Loader Events?

Web Font Loader provides an event system that developers can hook into. It gives you notifications of the font loading sequence in both CSS and JavaScript.

loading - This event is triggered when all fonts have been requested.

active - This event is triggered when the fonts have rendered.

inactive - This event is triggered when the browser does not support linked fonts or if none of the fonts could be loaded.

fontloading - This event is triggered once for each font that's loaded.

fontactive - This event is triggered once for each font that renders.

fontinactive - This event is triggered if the font can't be loaded.

 224 views

5⟩ How to Configure Web Font Loader?

The Web Font Loader configuration is defined by a global variable named WebFontConfig, or passed directly to the WebFont.load method. It defines which fonts to load from each web font provider and gives you the option to specify callbacks for certain events. When using the asynchronous approach, you must define the global variable WebFontConfig before the code that loads the Web Font Loader

 202 views