facetype-js

1.0.22 • Public • Published

基本使用用方法

安装包

    npm install --save-dev facetype-js

导入文件

    import ft from "facetype-js";
    // 或者
    const ft = require("facetype-js");

facetype 介绍

    /**
     *
     * @params inputPath { string } 字体文件路径
     * @params isJson { boolean } true 输出JSON fase 输出JS 
     * @params reverseTypeface {boolean} 是否转换特定字符
     * @params restrictCharacterSetInput { string } 需要过虑掉的特定字符
     * @returns {string} 返回Json 或者JS
     *
     */
    ft.facetype(inputPath, isJson, reverseTypeface, restrictCharacterSetInput);

exportString 介绍

    /**
     *
     * @params outString { string }  facetype API 返回的值
     * @params namePath { string }  在web 为文件名称 在node为文件的输入路径 
     * @returns {void} 返回Json 或者JS
     *
     */
    ft.exportString(outString, namePath);

参照 facetype.js;

在node与web端将正版字体转换成three.js可加载的JSON字体,主要参考 facetype.js 如有侵权,请及时联系作者 邮箱 uljdcwykhgm@outlook.com

Package Sidebar

Install

npm i facetype-js

Weekly Downloads

25

Version

1.0.22

License

ISC

Unpacked Size

25.9 kB

Total Files

5

Last publish

Collaborators

  • uljdcwykhgm