Files
NapCatQQ/.pnpm-store/v3/files/06/bf417bcd8d9c01869bf9fa7b5919068a17ddfa14b8149bdb817641f6df5f5d5f0c4b3c8826f980b685f0dc993b1973774903069a03e403a9e7cf5775ef5cee
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

17 lines
379 B
Plaintext

/**
* @file otf转bse64字体
* @author mengke01(kekee000@gmail.com)
*/
import bytes2base64 from './util/bytes2base64';
/**
* ttf 二进制转base64编码
*
* @param {Array} arrayBuffer ArrayBuffer对象
* @return {string} base64编码
*/
export default function ttf2base64(arrayBuffer) {
return 'data:font/otf;charset=utf-8;base64,' + bytes2base64(arrayBuffer);
}