Skip to content
New issue

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

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

jie326513988
Copy link

@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