分享:《教育部重編國語辭典修訂本》共 162,806 條目

  • 有兩種實現方式:

    1. 如樓主所言,轉化為 WOFF 檔,打包入 MDD

    2. 將超出 30MB 體積的那些字體文件用 FontCreator 拆分,然後 CSS 中配置字體項,所有字體文件須隨同 MDX 處於同一路徑。【注:理論上也可以打包入 MDD,敝人未曾嘗試,期待壇友測試】

【參考代碼】

/* 字體設定 */
@font-face {
    font-family: FSung-p;
    src: local(FSung-p), local(FSung-m), url('./FSung-p.ttf'), url('./FSung-m.ttf');
    unicode-range: U+0-FFFD;
}

@font-face {
    font-family: FSung-1;
    src: local(FSung-1), url('./FSung-1.ttf');
    unicode-range: U+10000-1FFFF;
}

@font-face {
    font-family: FSung-2_01;
    src: local(FSung-2_01), url('./FSung-2_01.ttf');
    unicode-range: U+20000-2FFFF;
}

@font-face {
    font-family: FSung-2_02;
    src: local(FSung-2_02), url('./FSung-2_02.ttf');
    unicode-range: U+20000-2FFFF;
}

@font-face {
    font-family: FSung-3;
    src: local(FSung-3), url('./FSung-3.ttf');
    unicode-range: U+30000-3FFFF;
}

@font-face {
    font-family: FSung-F_01;
    src: local(FSung-F_01), url('./FSung-F_01.ttf');
    unicode-range: U+F0000-FFFFF;
}

@font-face {
    font-family: FSung-F_02;
    src: local(FSung-F_02), url('./FSung-F_02.ttf');
    unicode-range: U+F0000-FFFFF;
}

@font-face {
    font-family: FSung-X;
    src: local(FSung-X), url('./FSung-X.ttf');
    unicode-range: U+100000-10FFFF;
}

/* 字目 */
.entry {
    font-family: FSung-p, FSung-1, FSung-2_01, FSung-2_02, FSung-3, FSung-F_01, FSung-F_02, FSung-X;
}

【字體拆分參考】【部件檢索】〖手機專用〗【樣式表+全宋體】

4 个赞