为非拉丁文字呈现 True Type 字体
我正在从事这个 LED 显示屏项目,该项目必须支持多种印度语言,以支持印度最贫困的人们使用 GPRS 调制解调器在 LED 显示屏上显示他们获得免费口粮和煤油的权利。带宽有限。由于数据量很大,无法使用强位图。需要以 ASCII 传输并在基于 8 位处理器的 LED 显示屏中构建字体。
如何提取字体中的字形信息并使用它来生成固定像素数的索引?输出看起来像 LED 屏幕上的 detector.ttf 字体。如何提取规则库或字体中指导字符如何在相邻字符上混合(通过上标/下标)的内容?
I am working on this project for LED displays which have to support multiple Indian languages to support the poorest of people in India ti display their entitlements to free food rations and kerosene on LED display panels using GPRS modems. Bandwidth is limited. cant use the bitmap strong as data is heavy. NEEd to transmit in ASCII and build the font in LED display which is 8-but processor based.
How can i extract the glyph infomraiton in a font and use it to generate an index of fixed pixel count? The output would look like decoder.ttf font on an LED screen. How to extract the rule base or whatever it is within the font that guides how characters inter-mingle (by superscripting/ subscripting) over the neighbouring characters?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您使用的字体是“固定间距”,也称为“等宽”,而不是按比例间距(每个字符在水平方向上占用不同的空间量)。如果字体不是固定间距的,则尝试将其强制为固定像素数将不会获得正确的结果。
假设您使用的字体包含 OpenType 布局信息(GSUB、GPOS 等),您将需要读取该信息并应用它。如果您的平台不支持,有许多库可以执行此操作还没有提供一些东西。或者,您可以使用 OpenType 规范 作为指南,自行推出(祝你好运) ...这不是一项微不足道的任务)。
Ensure that the font you're using is "fixed pitch", also known as "monospaced" as opposed to proportionally-spaced (each character takes up a different amount of space, horizontally). If the font is not fixed-pitch, you will not get correct results trying to force it into a fixed pixel count.
Assuming that you are using a font that contains OpenType layout information (GSUB, GPOS, and so on), you will need to read that information and apply it. There are a number of libraries to do this if your platform doesn't provide something already. Or you can roll your own, using the OpenType specification as a guide (good luck...it is not a trivial undertaking).