CHDK with chinese language - General Discussion and Assistance - CHDK Forum

CHDK with chinese language

  • 0 Replies
  • 1824 Views
CHDK with chinese language
« on: 04 / March / 2010, 21:04:09 »
Advertisements
At first, I'm sorry for my english. :(

I'm chinese. I want show chinese in "Text Reader", so I modified a few code, and added chinese font file. I compiled the CHDK. On my CANON A630, the new CHDK works. :)

I published it to http://pinlian.net/chdk

The format of Chinese_font_file IS NOT a real font_format!

the format of chinese_font_file:

   for (c1=0x81; c1<0xff; c1++)
      for (c2=0x40; c2<0xff; c2++)
         put_pixels_bytes_to_font_file(unsigned char 32 bytes);


the pixels of a chinese_char (two english chars):

//   left pixels:
   for (i=0; i<16; i++){   //   16 lines
      p=0;
      for (j=0; j<8; j++){   // 8 columns
         p = (p<<1) | is_a_pixel(i, j);
      };
      pixels_buf[i ] = p;
   };
//   right pixels:
   for (i=0; i<16; i++){   //   16 lines
      p=0;
      for (j=8; j<16; j++){   // 8 columns
         p = (p<<1) | is_a_pixel(i, j);
      };
      pixels_buf[i+16] = p;
   };




usage for my CHDK:
    1.install my CHDK as a normal CHDK.
    2.In CHDK main menu, select Visual Settings->Language..., find CHINESE.LNG and select it.
    3.Done. :)

Note:
    1. CHINESE.LNG If you want to change the file name, please also modify the CHINESE.BIN the file name.
    2. CHINESE.LNG you can modify the contents of the file.
    3.CHINESE.BIN the font is Arial, temporary does not provide other fonts.

Known issues:
    1. Fonts too small.
    2. Occasionally garbled. Some of the menu options are garbled. Text-reading, you may be garbled.
    3. The Chinese state, the menu choices, and sometimes do not see whether the menu is selected.


this is my source code. (include only modifyed files. the CHINESE.BIN is too big, Excluded it.).
« Last Edit: 10 / March / 2010, 20:04:53 by dirtytom »

 

Related Topics