开发者 | judgej |
---|---|
更新时间 | 2017年5月3日 22:24 |
捐献地址: | 去捐款 |
PHP版本: | 3.3 及以上 |
WordPress版本: | 4.7.4 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/
directory or google-fonts-for-woo-framework.zip through the "Add Plugins" administration page.This plugin is managed on github here https://github.com/academe/google-webfonts-for-woo-framework Feel free to raise issues there and make pull requests, as well as in the normal way on wordpress.org
Some hosts may not be set up to allow your site to fetch data from remote sites. Please report any such errors on the plugin page or github, and we will try looking for a workaround.
Yes, you can. WooThemes themes provides a short-code tag that allows you to embed any font in the body of a page or post. However, the list of fonts that the short-code quick-create function that the content editor provides, will not include the full list of fonts. To work around this, just select any random font to create a short-code tag, then change the name of the font manually in that tag. The theme will load that font automatically when you display the page or post.
Many Google Webfonts come with variants, and these are listed against each font in the plugin settings page. A variant is another version font from the same font family, that is used for displaying a different style or weight. Where a variant does not exist, for example if there is no "italic" variant, the web browser will fake it and make a best guess of what it would look like. This is not ideal from a design perspective. So where possible, use fonts that have variants listed that cover the styles and weights that you want to use in your design. That way you will get a font that has been carefully designed for that purpose. The settings page allows you to preview specific variants of each font, as well as the standard core font (generally normal/non-italic, and regular/400-weight).
For now, yes it is. The Woo Framework is designed to pull in external webfonts from Google only at present. There are plans to extend this to other sources of web-based fonts, with the risk that it may be a little ess robust when it comes to theme updates from WooThemes. However, that will likely be a separate plugin; this plugin will continue to support just Google Webfonts.
If you do not supply a valid API key, this plugin will fall back to the fonts listed in fonts.json To get an updated list of fonts for that file, make sure you have a valid API key then add this parameter to the end of the settings page for this plugin: export=1 Your URL will look like this: http://yoursite.example.com/wp-admin/options-general.php?page=gw-for-wooframework&export=1 This will then list all the fonts and their variants downloaded from the Google API in the same format that fonts.json uses. There is no API at this time for fetching the subsets (latin, greek etc) or font classes (serif, sans serif, handwriting, etc), so that information is not included. However, if you are interested in those details, I'm trying to keep an updated list here: https://github.com/academe/GoogleFontMetadata
In the settings page, you can select a filter for the font weights. By selecting weights, only those weights will be requested from Google. What happens, is that when you request a font from Google, it is delivered with all the weights that it supports. Those weights may include ultra-bold, ultra-light, semi-bold and so on, as well as the standard light/normal/bold (also known as 300, 400 and 700). Each of these weights adds to the download payload and that can be excessive for some fonts, especially for users on slow or expensive connections. By filtering the weights - by default just asking for 300/400/700 - the fonts downloaded from Google can be much smaller. WooThemes themes only support these three weights in the theme administration pages, so this is why we only request these three by default. If you have extended the theme and require additional weights, then select the weights that you would like included in the settings page. Those weights will then be requested for all all fonts used from Google, but only where Google offers those weights. Selecting a weight, or not selecting it, will not change the weights your browser will attempt to display. What it changes is the glyphs for the exact weights that are requested from Google. It is a performance enhancement; don't download what is not needed.
You can reset the key by blanking it out on the settings page. By deactivating and reactivating the plugin, the default shared key will be added back in.