Working with the Google Font API`s bolditalic Argument
In this seventh part of the series, I demonstrate how to work with the “bolditalic” argument included with Google’s Font API. The use of the argument is very similar to its counterparts “italic” and “bold” discussed in previous articles, so understanding its underlying logic is truly a breeze.
Working with the Google Font API`s bolditalic Argument - Using the bolditalic option (Page 3 of 4 )
Using the “bolditalic” option referenced in the preceding segment is very similar to working with other font modifiers discussed previously. For example, say that you need to simultaneously request the italic and bold styles of the “Cantarell” font. In a case like this, the Font API should be queried in the following manner:
There you have it. By simply appending the “bolditalic” argument to the name of the requested font, it’s possible to have at your disposal its italic and bold styles at the same. What’s more, once the font has been properly downloaded, using it to decorate some HTML elements is reduced to coding the following CSS styles:
font: normal 46px 'Cantarell', Helvetica, sans-serif;
font: normal 40px 'Cantarell', Helvetica, sans-serif;
font: normal 32px 'Cantarell', Helvetica, sans-serif;
font: normal 14px 'Nobile', Helvetica, serif;
It's so simple to understand how the previous CSS styles do their business that we needn't discuss it further. What we do need to do now, however, is include the styles in a web page. In this way you’ll be able to see the actual functionality of the “bolditalic” argument when used with the group of selectors coded before.
The full details of this process will be discussed in the next section. To learn more, click on the link that appears below and keep reading.