Giter VIP home page Giter VIP logo

font-spider-plus's People

Contributors

allanguys avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

font-spider-plus's Issues

fsp run报错

$ fsp run
⠋ 配 置 读 取 完 成 (node:1898021) MaxListenersExceededWarning:
Possible EventEmitter memory leak detected. 11 SIGINT listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1898021) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(node:1898021) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGHUP listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(node:1898021) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
⠙ 正 在 分 析 配 置 中 的 网 址 .../usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:348
      reject(new Error([
             ^
Error: Failed to launch chrome!
/usr/local/share/.config/yarn/global/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error
while loading shared libraries: libXdamage.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
    at onClose (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:348:14)
    at Interface.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/puppeteer/lib/Launcher.js:337:50)
    at Interface.emit (node:events:525:35)
    at Interface.emit (node:domain:489:12)
    at Interface.close (node:internal/readline/interface:534:10)
    at Socket.onend (node:internal/readline/interface:260:10)
    at Socket.emit (node:events:525:35)
    at Socket.emit (node:domain:489:12)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Node.js v19.4.0

VUE项目, TypeError: Cannot read property 'chars' of undefined

ouis@louisdeMacBook-Pro assets % fsp run
✔ 页面分析完成

/Users/louis/.nvm/versions/node/v16.0.0/lib/node_modules/font-spider-plus/bin/index.js:250
if(webFonts[0].chars === ''){
^

TypeError: Cannot read property 'chars' of undefined
at /Users/louis/.nvm/versions/node/v16.0.0/lib/node_modules/font-spider-plus/bin/index.js:250:28
at CB (/Users/louis/.nvm/versions/node/v16.0.0/lib/node_modules/font-spider-plus/node_modules/fs-extra/lib/remove/rimraf.js:57:5)
at FSReqCallback.oncomplete (node:fs:184:23)

fsp local目录查询问题

我的本地网页中使用了相对路径:\css\index.css
运行fsp local **\*.html时,fsp却报错找不到:D:\\css\\index.css

fsp run运行时报错

错误内容:

\ 正在分析配置中的网址...(node:16832) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'push' of undefined
    at intoTokens (C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\tokenizer\tokenize.js:311:17)
    at tokenize (C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\tokenizer\tokenize.js:77:10)
    at fromStyles (C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\reader\read-sources.js:147:12)
    at fromString (C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\reader\read-sources.js:48:10)
    at doReadSources (C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\reader\read-sources.js:33:12)
    at readSources (C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\reader\read-sources.js:24:10)
    at C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\clean.js:115:12
    at C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\clean.js:135:34
    at minify (C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\clean.js:114:35)
    at CleanCSS.minify (C:\Users\EmptyDreams\AppData\Roaming\npm\node_modules\font-spider-plus\node_modules\clean-css\lib\clean.js:77:12)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16832) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16832) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

JS配置内容

{
    "localPath" : "../source/self/fonts/",
    "onlinePath" : "../self/fonts/",
    "url" :  [
        "http://localhost:4000/"
    ]
}

注:服务器在本地上,用hexo s生成的,所以用的本地链接

demo error

Error: "//fn.qq.com/web2018../font/fn.ttf" file not found
at Compress.min (/home/user/temp/node_modules/font-spider/src/compressor/index.js:131:29)
at Compress. (/home/user/temp/node_modules/font-spider/src/compressor/index.js:63:22)
at DestroyableTransform.emit (events.js:187:15)
at /home/user/temp/node_modules/gulp/node_modules/readable-stream/lib/_stream_readable.js:965:16
at process._tickCallback (internal/process/next_tick.js:61:11)

Could you please share more examples for the parameters usage?

使用中的问题

font.css:
@font-face {
font-family: 'SourceHanSerifCN';
src: url('SourceHanSerifCN-Bold.ttf');
font-weight: normal;
font-style: normal;
}

body{
font-family: 'SourceHanSerifCN';
}

运行:fsp local index.html如下:
\ 正在优化...not support cmap format:14
√ 没有发现可以优化的自定义字体

重新启动项目发现字体又恢复原来的样式了。

fsp run 时出现错误

fsp run 的时候出现如下错误:

⠋ 配置读取完成(node:16680) UnhandledPromiseRejectionWarning: Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at Launcher.launch (/root/.nvm/versions/node/v12.12.0/lib/node_modules/font-spider-plus/node_modules/puppeteer/lib/Launcher.js:119:15)
    at async /root/.nvm/versions/node/v12.12.0/lib/node_modules/font-spider-plus/bin/index.js:148:33
(node:16680) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16680) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

已安装 chromium……

fsp run出现超时的问题

正在分析配置中的网址...(node:12524) UnhandledPromiseRejectionWarning: TimeoutE
rror: Navigation Timeout Exceeded: 30000ms exceeded;
demo也会出现这种问题

Unexpected token ]

在生产环境 运行fsp run的时候,出现
undefined:7 ] ^ SyntaxError: Unexpected token ] in JSON at position 137 at JSON.parse (<anonymous>) at checkFile (/usr/local/lib/node_modules/font-spider-plus/bin/index.js:115:23) at doM (/usr/local/lib/node_modules/font-spider-plus/bin/index.js:133:9) at Command.<anonymous> (/usr/local/lib/node_modules/font-spider-plus/bin/index.js:49:9) at Command.listener (/usr/local/lib/node_modules/font-spider-plus/node_modules/[email protected]@commander/index.js:315:8) at Command.emit (events.js:182:13) at Command.parseArgs (/usr/local/lib/node_modules/font-spider-plus/node_modules/[email protected]@commander/index.js:654:12) at Command.parse (/usr/local/lib/node_modules/font-spider-plus/node_modules/[email protected]@commander/index.js:474:21)
还有一个问题是 localPath 是相对于根目录即vue.config.js这层么? onlinePath 则是相对于 打包好的
dist目录么?

error:cloud not convert the given font.

一个简单的demo 只有一个html文件,js内嵌 。
Ubuntu14.04.
node: v8.15.0.
运行fsp local index.html 或 sudo fsp local index.html 得以下报错:

正在优化...Parsing of the input font failed.

{ Error: Could not convert the given font.
at Transform.ttf2woff2GulpTransform [as _transform] (/usr/lib/node_modules/font-spider-plus/node_modules/[email protected]@gulp-ttf2woff2/src/index.js:76:25)
at Transform._read (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_transform.js:184:10)
at Transform._write (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_transform.js:172:83)
at doWrite (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js:417:5)
at Transform.Writable.write (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js:334:11)
at Through2.ondata (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.0.6@readable-stream/lib/_stream_readable.js:531:20)
at emitOne (events.js:116:13)
at Through2.emit (events.js:211:7)
at readableAddChunk (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.0.6@readable-stream/lib/_stream_readable.js:198:18)
name: 'Error',
message: 'Could not convert the given font.',
stack: 'Error: Could not convert the given font.\n at Transform.ttf2woff2GulpTransform [as _transform] (/usr/lib/node_modules/font-spider-plus/node_modules/[email protected]@gulp-ttf2woff2/src/index.js:76:25)\n at Transform._read (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_transform.js:184:10)\n at Transform._write (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_transform.js:172:83)\n at doWrite (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js:428:64)\n at writeOrBuffer (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js:417:5)\n at Transform.Writable.write (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.3.6@readable-stream/lib/_stream_writable.js:334:11)\n at Through2.ondata (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.0.6@readable-stream/lib/_stream_readable.js:531:20)\n at emitOne (events.js:116:13)\n at Through2.emit (events.js:211:7)\n at readableAddChunk (/usr/lib/node_modules/font-spider-plus/node_modules/_readable-stream@2.0.6@readable-stream/lib/_stream_readable.js:198:18)',
showStack: true,
showProperties: true,
plugin: 'gulp-ttf2woff2' }

麻烦问下大概什么问题?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.