In this fifth part of the series, we examine the “bold” argument provided by Google’s Font API. It's used for requesting and downloading the bold style of a specified font family. As with the “italic” option discussed in earlier parts, you should use “bold” on web pages with due caution and responsibility (or in other words, don’t commit the cardinal sin of displaying all your HTML elements in bold!).
Using the Google Font API`s Bold Argument (Page 1 of 4 )
In addition to being the most powerful contender in the search engine field, in the last few years Google has gained considerable popularity in other areas through the implementation of a number of additional web services conceived to make the life of web developers and designers a little bit easier.
A good example of the influence of the company in several disparate terrains is the recent introduction of its Font API. This service allows developers to embed for free a respectable number of commercial fonts into web pages by means of a simple and intuitive syntax, nearly identical to the one used for including external sheets in (X)HTML documents.
The model provided by the Font API is so flexible that it not only delivers multiple font families compressed from Google's hosts, but it allows developers to use this process in a truly selective way. One can download fonts only in their italicized and bold versions respectively, if desired, via a few simple arguments, which must be passed in the query string when invoking the API.
I left off the last article of this series discussing how to use the API's "i" option, which is nothing but a shortened syntax for its "italic" argument. As you'll possibly recall, this option should be utilized for downloading only the italic style of a specified font family. This process was covered in depth in previous tutorials.
As I said a moment ago, however, the Font API also gives web designers the ability to download the bold style of a given font family. How can this be done? Well, similar to its "italic" option, the API accepts an extra parameter, not surprisingly called "bold," which performs the aforementioned task painlessly. So, assuming that you're interesting in learning how to work with the "bold" option, in the lines to come I'm going to code for you some approachable examples. These will let you start using this argument when styling text-based elements of your own web pages.
Now, it's time to start discussing this additional feature provided by the Google Font API. Let's go!