parlr / ruby-font-creator

Generate rich Unicode open fonts with custom annotations, transliterations, pronunciations.
21 stars 3 forks source link

Data duplicates crash the script #26

Closed hugolpz closed 7 years ago

hugolpz commented 7 years ago

Add json data preprocessing step to avoid duplicate (?)


screenshot from 2017-04-05 11-46-41

cri-ninja@hp-840:~/yug/Hanzi-Pinyin-Font$ npm start

> hanzi-pinyin-font@ start /home/cri-ninja/yug/Hanzi-Pinyin-Font
> node --max_old_space_size=8192 --optimize_for_size --max_executable_size=4096 --stack_size=4096 --require babel-core/register ./index.js

Error: The glyph name "㐀" must be unique.
    at SVGIcons2SVGFontStream._svgIcons2SVGFontStreamTransform [as _transform] (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/svgicons2svgfont/src/index.js:153:27)
    at SVGIcons2SVGFontStream.Transform._read (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/readable-stream/lib/_stream_transform.js:159:10)
    at SVGIcons2SVGFontStream.Transform._write (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/readable-stream/lib/_stream_transform.js:147:83)
    at doWrite (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/readable-stream/lib/_stream_writable.js:345:64)
    at clearBuffer (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/readable-stream/lib/_stream_writable.js:445:7)
    at onwrite (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/readable-stream/lib/_stream_writable.js:376:7)
    at WritableState.onwrite (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/readable-stream/lib/_stream_writable.js:126:5)
    at afterTransform (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/readable-stream/lib/_stream_transform.js:81:3)
    at TransformState.afterTransform (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/readable-stream/lib/_stream_transform.js:58:12)
    at SAXStream.svgicons2svgfontSaxEnbCb (/home/cri-ninja/yug/Hanzi-Pinyin-Font/node_modules/svgicons2svgfont/src/index.js:259:7)
(node:30055) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'ttf' of undefined
cri-ninja@hp-840:~/yug/Hanzi-Pinyin-Font$ git pull
edouard-lopez commented 7 years ago

could you:

  1. git pull latest version
  2. npm test
  3. npm start

You should get a small font file with glyphs from different scripts.

edouard-lopez commented 7 years ago

no activity for 6 month, I close it.