Skip to content

修复多项字符无法显示BUG#18

Open
jie326513988 wants to merge 17 commits intok-omura:masterfrom
jie326513988:master
Open

修复多项字符无法显示BUG#18
jie326513988 wants to merge 17 commits intok-omura:masterfrom
jie326513988:master

Conversation

@jie326513988
Copy link
Copy Markdown

@jie326513988 jie326513988 commented Feb 25, 2024

  • 修复大部分字体标点符号异常,字符显示空白和位置异常的BUG,
    • fillGlyph()传入负值会导致崩溃
    • 以空格字符的2倍advanceWidth作为advanceWidthMAX值(从hmet表获取的advanceWidth异常时)
    • advanceWidth值异常时使用advanceWidthMAX值
    • 对leftSideBearing和glyph.xMin进行判断,以便能以正常的数值进行后续计算(从hmet表获取的leftSideBearing异常时)
  • 添加一个获取字符宽度的函数,就是在textDraw()中获取_x值,可以少计算一次宽度。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant