SolidZORO / zpix-pixel-font

Zpix (最像素) is a pixel font (中文像素字体), supporting English, Chinese (Simplified + Traditional) and Japanese.
https://zpix.vercel.app/
2.41k stars 67 forks source link

OTS parsing error: OS/2: Failed to parse table #45

Closed weihao closed 2 years ago

weihao commented 2 years ago

Screenshot 2021-11-10 220008

SolidZORO commented 2 years ago

这个是什么软件?你知道如何修复吗?

weihao commented 2 years ago

https://github.com/HinTak/Font-Validator

SolidZORO commented 2 years ago

image

我跑了一下测试发现只有这个 error,不过我不清楚如何修复,因为 bdf 生成 ttf 是使用工具 https://github.com/kreativekorp/bitsnpicas 来完成的,请问这个 error 会对使用造成什么困扰吗?

weihao commented 2 years ago

这个错误会让浏览器报错,字体失效

OTS parsing error: OS/2: Failed to parse table
weihao commented 2 years ago

get a font that isn't broken. The error is pretty clear: you're trying to load a font that has errors in it, and browsers won't let you use a font with errors in it, because errors can be used for zero-day exploits that browser makers can't know about. Get a woff2 (or older woff) version of your font (yes, that different extension is an important difference), and things should work (because you won't be able to woff convert a broken font either). – Mike 'Pomax' Kamermans Dec 6 '18 at 23:10

https://stackoverflow.com/questions/53648435/failed-to-decode-downloaded-font-ots-parsing-error-localhost

SolidZORO commented 2 years ago

是否和你转换字体的方式有关? 我在 https://zpix.vercel.app/ 上使用 https://github.com/SolidZORO/zpix-pixel-font/blob/master/website/zpix.woff2 似乎没发现这个问题。

weihao commented 2 years ago

确实,我用了demo里的字体显示正常了。

你是怎么转换的呢?

SolidZORO commented 2 years ago

https://github.com/SolidZORO/zpix-pixel-font/blob/d07c756e4c6f6f00ec2e802536f03450afe8e43f/tools/build.sh#L10

可以参考这个文件。

weihao commented 2 years ago

thx!

closing the issue.