We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
部分 otf 字体的 advanceWidth 值读取错误,造成文字间距错乱字符堆叠,仅影响部分 otf 字体的非中文字符
与 opentype.js 对比排查后发现,如下部分代码逻辑中在部分 otf 字体场景下 nominalWidthX 值获取有误,导致最终对应字形的 advanceWidth 有误
fonteditor-core/src/ttf/table/CFF.js
Line 160 in 9e43033
排查过程中还发现该处代码中 item.advanceWidth 值正常 glyf[i].advanceWidth 值有误,简单修改设置优先取 item.advanceWidth 是否可行?
item.advanceWidth
glyf[i].advanceWidth
fonteditor-core/src/ttf/otfreader.js
Line 110 in 9e43033
以下截图为问题具体现象,上图为完整字体中 a 字形的相关参数,下图为截取后的字体。注意对比 advanceWidth 值
The text was updated successfully, but these errors were encountered:
得研究一下,otf 相关解析是照搬 opentype.js 的,可能需要做一些修正,能帮忙给有问题的字体和字符么。
Sorry, something went wrong.
同有这个问题,请问现在这个有解法么?
No branches or pull requests
部分 otf 字体的 advanceWidth 值读取错误,造成文字间距错乱字符堆叠,仅影响部分 otf 字体的非中文字符
与 opentype.js 对比排查后发现,如下部分代码逻辑中在部分 otf 字体场景下 nominalWidthX 值获取有误,导致最终对应字形的 advanceWidth 有误
fonteditor-core/src/ttf/table/CFF.js
Line 160 in 9e43033
排查过程中还发现该处代码中
item.advanceWidth
值正常glyf[i].advanceWidth
值有误,简单修改设置优先取item.advanceWidth
是否可行?fonteditor-core/src/ttf/otfreader.js
Line 110 in 9e43033
The text was updated successfully, but these errors were encountered: