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

关于生成后的字库如何使用? #1

Open
ykmvim opened this issue Mar 2, 2018 · 1 comment
Open

关于生成后的字库如何使用? #1

ykmvim opened this issue Mar 2, 2018 · 1 comment

Comments

@ykmvim
Copy link

ykmvim commented Mar 2, 2018

感谢你的无私奉献。使用上有几个问题想请教一下你:

  1. 生成GB2312 的字库后,为什么有很多 都是0x00 的 ,没有显示任何东西。(我生成的是c 文件)
  2. 生成的GB2312 汉字字库, 使用时 如何查找到对应的数据, 比如一个“我”字 。
@Jiangxiaogang
Copy link
Owner

1.GB2312有一些字符目前还没有定义,处理保留阶段,所以是空白;
2.按照GB2312区位码的计算方式,获取字符偏移: offset = (high - 0xA1) * 94 + (low - 0xA1);
offset: 表示这个字符在编码表中的位置;
high: 字符内码的高8位;
low: 字符内码的低8位;
查找对应的数据:offset * 单个字符所占数据的大小;
单个字符所占数据的大小:((点阵宽度+7)/8)*点阵高度

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

No branches or pull requests

2 participants