
To use the effect, add the corresponding class name to your HTML element(s). In our example above, we used the shadow-multiple font effect, To use this beta feature, simply add effect= to your Google FontsĪPI request and add the corresponding class name to the HTML element(s) that you Provided a collection of font effects that you can use with minimal effort to When making headers or display texts on your website, you'll often want to It allows you to refer to any character in the original font. Note: there's no need to specify the subset= parameter when using text= as This feature also works for international fonts, allowing you to specify UTF-8Ĭharacters. Here is what the request would lookĪs with all query strings, you should URL-encode the value: ForĮxample if you're only using Inconsolata for the title of your blog, you can put To use this feature, simply add text= to your Google Fonts API requests. In some cases, this can reduce the size of the font file by up to 90%. This allows Google to return a font file that's optimized for your In these cases, you should consider specifying a text= value in your font Know in advance which letters you'll need. Oftentimes, when you want to use a web font on your website or application, you

Supported by the font to get what it needs to render the text.įor a complete list of available fonts and font subsets please see The subset parameter is ignored the browser will select from the subsets Please note that if a client browser supports unicode-range The Latin subset is always included if available and need not be specified. To request both Greek and Cyrillic subsets of the To specify which subsets should be downloaded the subset parameter should beįor example, to request the Cyrillic subset of the Support multiple scripts (like Latin, Cyrillic, and Greek for example). Some of the fonts in the Google Font Directory Pass the desired value in the querystring display parameter: Than the default auto is usually appropriate.
#Code the web wallpaper full
To find out which styles and weights are available for a given font, see theįor each style you request, you can give either the full name or anĪbbreviation for weights, you can alternatively specify a numerical weight: Styleīold or b or a numerical weight such as 700įor example, to request Cantarell italic and Droid Serif bold, you could use anyĬontrol what happens while the font is unavailable. The font, followed by a list of styles or weights separated by commas ( ,). To request other styles or weights, append a colon ( :) to the name of The Google Fonts API provides the regular version of the requested fonts byĭefault.

Lot of fonts may make your pages slow to load.) (But don't go overboard most pages don't need very many fonts, and requesting a Requesting multiple fonts allows you to use all of those fonts in your page. To request multiple font families, separate the names with a pipe character
#Code the web wallpaper plus
Note: Replace any spaces in the font family name with plus signs ( +). Then, add the family= URL parameter, with one or more font family names and To determine what URL to use in your stylesheet link, start with the Google Specifying font families and styles in a stylesheet URL So the browser can fall back to its default fonts if need be.įor a list of fonts you can use, see Google Fonts. In particular,Īdd a CSS generic font name like serif or sans-serif to the end of the list, Note: When specifying a web font in a CSS style, always list at least oneįallback web-safe font in order to avoid unexpected behaviors. Or with an inline style on the element itself: Style an element with the requested web font, either in a stylesheet: You can start using the Google Fonts API in just two steps:Īdd a stylesheet link to request the desired web font(s): And that's only the beginning of what you can do with the Fonts API and CSS.
