emfont 官方文件

純 CSS 載入字體

純 CSS 載入字體

你可以直接以 CSS 載入整個字體。Google Fonts,你懂的。

GET https://font.emtech.cc/css/:font:

完整字體

目前會提供原始的字體格式,可能會耗費較多網路資源與增加等待時間。

範例:

<link href="https://font.emtech.cc/css/:font:" rel="stylesheet">

選擇文字

你可以透過參數自訂字體粗細以及包含的文字。

<link href="https://font.emtech.cc/css/:font?weight=:weight&words=:words" rel="stylesheet">

範例:

<link href="https://font.emtech.cc/css/jfOpenHuninn?weight=400&words=神乎其技,原其事理。" rel="stylesheet">

極致壓縮

為你專屬切一份字體,詳見極致壓縮。只需在後面加入參數 ?min=true

範例:

<link href="https://font.emtech.cc/css/jfOpenHuninn?weight=400&words=神乎其技,原其事理。&min=true" rel="stylesheet">

使用 @import

當然,你也可以使用 @import 來載入字體。

@font-face {
    font-family: '朱雀仿宋';
    src: url('https://font.emtech.cc/css/jfOpenHuninn?weight=400&words=神乎其技,原其事理。') format('woff2');
}

On this page