emfont 官方文件

快速入門

入門快速

選擇字型

<p class="emfont-jfopenhuninn">
    這個段落使用了 justfont 的 open 粉圓字型。
</p>

載入並啟動 emfont

<script type="module">
    import "https://font.emtech.cc/emfont.js";
    emfont.init();
</script>

要放在 <head><body><footer> 都行。幾 KB 而已,你開心就好。但請記得先載入完 HTML 再執行這段 script,否則 emfont 找不到字。

如果你不喜歡使用 module,也可以使用傳統的 script 標籤載入 emfont.js。

<script src="https://font.emtech.cc/emfont.js"></script>
<script>
    emfont.init();
</script>

On this page