Author Topic: Change rbf font for Chinese  (Read 3521 times)

seed93

  • New to the forum
  • *
  • Posts: 2
Change rbf font for Chinese
« on: July 19, 2016, 10:41:03 AM »
I want to translate ML to Chinese but failed. I knew I need a Chinese rbf font and I got one from www.tecdee.com. This website has been discussed before because of its commercial use.

This rbf font is over 200kb and has over 6k characters. I use bmp_printf for debug. When it loads font in rbf_font.c by font_by_name, it is stucked in rbf_font_load, more specificaly in
line:204 font_read(fd, (unsigned char*)f->cTable, f->charCount*f->hdr.charSize);

I got a debug info before return bytes_read in font_read, but got nothing out of font_read. Then the camera doesn't show menu any more, using delete button or menu button, and will go wrong when taking a pic.

Hope anyone can give some help.

http://pan.baidu.com/s/1miMvIvI
This is a Chinese version for 60D downloaded from www.tecdee.com

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Change rbf font for Chinese
« Reply #1 on: July 19, 2016, 12:43:09 PM »
You may find it easier to debug it in QEMU - it emulates the 60D GUI very well, and you can use GDB or IDA to debug it much like you would do for a PC program.

seed93

  • New to the forum
  • *
  • Posts: 2
Re: Change rbf font for Chinese
« Reply #2 on: July 21, 2016, 07:02:16 AM »
Thank you for you kindness and quik reply. I tried in QEMU and it is much easier. However I found it was hard to adapt for Chinese.

1. Chinese has thousands of chars and it will explode the memory.
2. RBF font doesn't support for Chinese codepage.
3. Your code assumes every character can be indexed by a char type in [0,255], but Chinese needs wchar.

As conclusion, only languages which have less than 256 characters can be used.
Tell me if I am wrong. Thank you.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Change rbf font for Chinese
« Reply #3 on: July 21, 2016, 01:36:21 PM »
That's correct - the changes needed to fix these issues are nontrivial.