In this second part of the series, I take an in-depth look at the “italic” option provided by Google’s Font API. It comes in handy for downloading and using the italicized version of a specified font family. The driving logic of this option is very easy to grasp, so you shouldn’t have major trouble using it when styling text-based elements on your own web pages.
Using the Google Font API`s Italic Option (Page 1 of 4 )
Even though Google's main focus has always been search, the company is also famous for exploring a plethora of disparate terrains, sometimes with good results and some with little or no relevance. This time, though, it seems that the search engine giant has done things right with the release of their Font API, a handy service that provides web designers with the ability to use, for free, a decent number of commercial font families on their websites.
Admittedly, the font embedding service offered by Google is still in its infancy, as it currently hosts a rather limited amount of commercial typefaces, especially when compared to companies that provide prepaid services like TypeKit. Considering the big wallet that Google currently boasts, hopefully the number of typefaces will grow in the future, as the company reaches more agreements with other font foundries.
While the commercial facet of Google's font embedding service is important, it's not an obstacle that should prevent you from using the font API right away. Indeed, in the first part of this series I used some easy examples to demonstrates how to use the API for decorating a few elements of a sample web page with the “Cantarell” and “Nobile” commercial fonts.
The entire styling process was reduced to first downloading the required fonts by passing the “family” query string argument to the API, and then assigning those typefaces to the targeted HTML selectors via some regular CSS declarations. It was that easy, really.
It’s valid to note, though, that all of the examples developed so far showed how to embed in a web page the normal version of a specified font family. But what happens if you need to use only the italic version of that font? Well, the Google Font API will allow you to accomplish this easily via its “italic” query string argument. In this second part of the series I’m going to demonstrate how to use the italicized version of a given font using the aforementioned “italic” parameter.
Ready to learn the full details of this process? Then jump ahead and begin reading!