any plans to using 16bits character ? - General Discussion and Assistance - CHDK Forum

any plans to using 16bits character ?

  • 9 Replies
  • 4479 Views
any plans to using 16bits character ?
« on: 22 / April / 2009, 03:41:00 »
Advertisements
so it can support CJK ?

use UTF-8 in lang file and use 16bits unicode for draw_char(), like ucgui.
fonts will be loaded only when necessary(with cache in RAM?) as there's no enough memory to store all the fonts.

Re: any plans to using 16bits character ?
« Reply #1 on: 23 / April / 2009, 21:07:02 »
UTF-8 uses up to three bytes per char, depending on the subset.
For ascii codes < 0x7F it uses one byte, so for english only, the language file won't increase a lot.
The problem is fonts will increase in size a lot and depending on implementation may use a lot of memory,

Re: any plans to using 16bits character ?
« Reply #2 on: 24 / April / 2009, 12:52:05 »
I have done it.

i removed the old rbf font support, and add a private format.
in the font file, there's an index area and data area.
the index area will be in RAM when font file loaded, and the data will be load from SD card when used.
I also added the font data cache in RAM.

the speed is the same as built-in font, i cannot find any delay.

the lng file is UTF-8 encoding. the font file is 16bits unicode.

i'll share it after I clean the codes.

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: any plans to using 16bits character ?
« Reply #3 on: 25 / April / 2009, 14:51:04 »
interesting. if it works like you say, this would make a nice addition to chdk, so chdk can be translated to more languages.

Re: any plans to using 16bits character ?
« Reply #4 on: 27 / April / 2009, 10:53:27 »
I'm so happy that you have interest in it.

I have put the codes at http://code.google.com/p/cnchdk/
and also a simple document is available at http://sites.google.com/site/cnchdk/dev_en

I deleted the rbf font file support, and use utf-8 encoding lng file.(but still use the "menu RBF font..." to load the new font file)
so, it can support multi-language well if the font file have the font data in lng file.

you can download the binary from http://code.google.com/p/cnchdk/wiki/download_en
and also, you can use simsun.DAT as font file for test. it contain about 22K characters. not only english and chinese.

now menu/mbox/text reader used the external font, but games and other modules still use draw_string() which used built-in fonts only. I'll clean it these days.

I really appreciate for anyone's feedback and suggestions.

*

Offline December172

  • *
  • 34
  • A student interested in the Canon P&S hack
Re: any plans to using 16bits character ?
« Reply #5 on: 30 / October / 2022, 23:16:12 »
Hi,stiger.
I'd like to show your font on my camera.But I couldn't find a vaild cnchdk version of my cam.
Also,when I want to make a font by your genft tool,I always gets a 'please increse CI' error.
Is this branch still developing?
I'm really want to make your achievements to newer CHDK version.
Thx
PS:I'm from the same country as you from.
Canon PowerShot ELPH 180 (IXUS 175).
(Seems most of you are older than me.... Anyone teen? )

*

Offline c_joerg

  • *****
  • 1251
Re: any plans to using 16bits character ?
« Reply #6 on: 31 / October / 2022, 02:47:54 »
stiger last activity was May 2009  ;)
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline December172

  • *
  • 34
  • A student interested in the Canon P&S hack
Re: any plans to using 16bits character ?
« Reply #7 on: 31 / October / 2022, 03:04:15 »
stiger last activity was May 2009  ;)
hm...
I think he's not here anymore. :(
Are there anyone have interest in support UTF-8?This will let CHDK supports more language.
Canon PowerShot ELPH 180 (IXUS 175).
(Seems most of you are older than me.... Anyone teen? )

*

Offline reyalp

  • ******
  • 14128
Re: any plans to using 16bits character ?
« Reply #8 on: 31 / October / 2022, 03:28:51 »
Are there anyone have interest in support UTF-8?This will let CHDK supports more language.
Sadly, it would be a huge amount of work, and likely quite difficult to fit within the memory limitations we have.
Don't forget what the H stands for.

*

Offline December172

  • *
  • 34
  • A student interested in the Canon P&S hack
Re: any plans to using 16bits character ?
« Reply #9 on: 31 / October / 2022, 04:22:55 »
Sadly, it would be a huge amount of work, and likely quite difficult to fit within the memory limitations we have.
I see this... ;) So I can only make a limited UTF-8 support? Just like only support Chinese or Japanese at the same time.And change font libs when changing the language file.This will be smaller(do like what stiger said),and may better than current rbf font.
(Or easier,just make it to a lib and let some modules use it(like text reader),but the code will be messy and CHDK will have two version of fonts.)
Yeah,it will be a huge work...But other country's people can make their own version of CHDK and just need to change the font and language file :) (Maybe only eastern Asian need this)
Canon PowerShot ELPH 180 (IXUS 175).
(Seems most of you are older than me.... Anyone teen? )

 

Related Topics


SimplePortal © 2008-2014, SimplePortal