這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

System Fonts

外掛說明

System Fonts enqueues a stylesheet that lets you use the native font on each operating system and defines a system-ui css @font-face that you can use on the customizer, your theme’s settings or your own code.

Usage example

The Twenty Seventeen theme uses this css selector for the body text:

body, button, input, select, textarea {
  font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
}

We are going to replace it with the default system font.
In you WordPress site, go to Appearance > Customize > Additional CSS and paste this code

body, button, input, select, textarea {
  font-family: system-ui;
}

Appart from them font-family, there are other font-properties available:

  • font-style: normal or italic;
  • font-weight: 300 (light), 400 (regular), 500 (medium), 700 (bold);

For example this is the code make an element’s text semibold and cursive:

#my-element {
  font-family: system-ui;
  font-weight: 500;
  font-style: italic;
}

安裝方式

  1. Upload the plugin files to the /wp-content/plugins/system-fonts directory, or install the plugin through the WordPress plugins screen.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈System Fonts〉的開發相關工作。

參與者

〈System Fonts〉外掛目前已有 3 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈System Fonts〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄