numworks / epsilon

Modern graphing calculator operating system.
https://www.numworks.com/resources/engineering/software/
1.71k stars 459 forks source link

Add Chinese language #1849

Open losehu opened 3 years ago

losehu commented 3 years ago

Hello, we like your calculator very much, but have you ever considered adding Chinese?

losehu commented 3 years ago

I try to add more unicode to "/kandinsky/code_points.h”,But it shows a box i dont konw how to add more, I would be very grateful if you could find time to answer for me!!

boricj commented 3 years ago

The epsilon firmware is using a custom TrueType font (https://github.com/numworks/epsilon/tree/master/kandinsky/fonts), therefore you need to add missing glyphs to these fonts or provide a workaround, otherwise the text rendering code will fallback to Unicode's "REPLACEMENT CHARACTER" (a.k.a. "�"). The firmware can't render glyphs that are missing from its fonts.

Also, adding glyphs will increase the size of the firmware in Flash. It's not a problem for the N0110 model with its 8 MiB NOR chip, but the old N0100 model and its 1 MiB internal Flash simply doesn't have the spare room for this anymore. If you're working with a physical calculator, do check it's not a N0100 model just in case.

Furthermore, keep in mind that epsilon's typesetting code is quite bare-bones as the calculator so far only had to cater to Western European languages. It only supports monospaced, left-to-right layouts with basic combining diacritical marks. That code may need improvements to support features required by a Chinese translation (https://github.com/numworks/epsilon/blob/master/kandinsky/src/context_text.cpp#L19). I'm no linguist so I don't know what improvements, if any, are actually needed here for the Chinese language.

Finally, beyond the technical challenges for a Chinese translation, as far as I'm aware the NumWorks calculator has not been designed with the Chinese curriculum in mind, so there could be features missing for the Chinese education market.

To summarize, while translating epsilon to Chinese should be doable, it's going to be harder to do than a translation to another Western European language because that's all the firmware had to support so far.

losehu commented 3 years ago

epsilon 固件使用自定义 TrueType 字体 ( https://github.com/numworks/epsilon/tree/master/kandinsky/fonts ),因此您需要为这些字体添加缺少的字形或提供解决方法,否则文本渲染代码将回退到 Unicode 的“替换字符”(又名“ ”)。 固件无法渲染其字体中缺失的字形。

此外,添加字形会增加 Flash 中固件的大小。 对于带有 8 MiB NOR 芯片的 N0110 型号来说这不是问题,但是旧的 N0100 型号和它的 1 MiB 内部闪存根本就没有多余的空间了。 如果您正在使用物理计算器,请检查它不是 N0100 型号以防万一。

此外,请记住,epsilon 的排版代码非常简单,因为到目前为止,计算器只需要满足西欧语言的需求。 它仅支持带有基本组合变音符号的等宽、从左到右的布局。 该代码可能需要改进以支持中文翻译所需的功能( https://github.com/numworks/epsilon/blob/master/kandinsky/src/context_text.cpp#L19 )。 我不是语言学家,所以我不知道这里实际上需要对中文进行哪些改进(如果有的话)。

最后,除了中文翻译的技术挑战之外,据我所知,NumWorks 计算器的设计并没有考虑到中文课程,因此中国教育市场可能缺少一些功能。

总而言之,虽然将 epsilon 翻译成中文应该是可行的,但它比翻译成另一种西欧语言更难,因为这是迄今为止固件必须支持的全部内容。

thanks a lot, I think we will try our best to achieve Chinese translation