Can I suggest trying a different compressor first? If the code behaves differently after minimizing, something fishy is going on with that minimizer. The big one to try would be grunt-contrib-uglify, which is the default recommended minifier in the grunt ecosystem.
Issues with fontkit and Roboto Thin
We're experiencing some strange issues when using fontkit and the Google font "Roboto-Thin"
When working with this font locally(localhost - http), everything works fine, but once we deploy our app to a production server(https), i.e. minimize, package(zip) and upload, the letter "a" in the Roboto-Thin font is gone.
I have done some console.log of the Fontkit.font object returned from this font. The letter "a" has acii code 97. If I understand the fontkit.font properly, I can see that characterSet entry 68 refers to 97. Then, when I look into the _glyphs array, I can see that the entry 68 has codePoints set to  on my localhost. However, on the https production server, the same _glyphs entry has codePoints set to an empty array(codePoints: ). I assume this is the reason why we can't see the letter "a" there.
I'm parsing the same Roboto-Thin.ttf file on my localhost and on the production server(xhr request to same url).- the font can be downloaded from Google fonts. On my localhost, I get correct Font data back from fontkit On a https production server, I get different font data for the same font where codePoints for _glyphs is empty. It's a very strange problem. Have you experienced this before, and do you have any tip on what the cause could be?
The ttf for Roboto-Thin.ttf is attached.
- 点赞 评论 复制链接分享
Probably the same underlying problem https://github.com/Munter/subfont/issues/109点赞 评论 复制链接分享
It's going to be hard to say what causes it without exact details on that build system: does it touch fonts? (if so, definitely worth making it not do that: just use woff2 -or legacy woff- and leave it as is, instead of running it through a build system).点赞 评论 复制链接分享
Thanks for your reply.
I can imagine that this is a hard issue to debug. From what I have found so far, It seems like fontkit are returning different data for this font after fontkit has been minimized(using https://github.com/gruntjs/grunt-contrib-compress).
Our system retrieves the font from an url using xhr. Then it's passed to fontkit. I did an md5 checksum for the font, and it was exact match for the working version(localhost) and the non-working version(https production site). However, fontkit reported different data.
We managed to come around this problem now by using "otf" fonts instead ( we cannot use woff). Roboto-Thin.otf works.点赞 评论 复制链接分享
- Golang HTML Web Apps中没有这样的模板“ xxx”
- Php Mysql：Button没有插入数据库
- 使用正则表达式从Google Fonts URL获取字体名称
- Html / php没有更新sql数据库[重复]
- php echo整个html而不使用readfile
- 网址友好，不会丢失样式css / js / images
- Laravel 5中应该在哪里存储配置值数组？