20 lines
526 B
JavaScript
20 lines
526 B
JavaScript
/**
|
|
* {test unit}
|
|
* @author yutent<yutent.io@gmail.com>
|
|
* @date 2024/02/04 11:48:14
|
|
*/
|
|
|
|
import { svg2ttf } from '../src/index.js'
|
|
import { toUnicode, key2underline, normalizeUnicode } from '../src/lib/utils.js'
|
|
import fs from 'iofs'
|
|
|
|
// let svg = fs.cat('test/game.svg').toString()
|
|
|
|
// let ttf = svg2ttf(svg)
|
|
|
|
// console.log(ttf)
|
|
|
|
console.log(toUnicode('哈哈'), normalizeUnicode('哈哈'))
|
|
console.log(toUnicode('哈'), normalizeUnicode(toUnicode('哈')[0]))
|
|
console.log(key2underline({ fooBar: '大', FooGoo: '圭' }))
|