能否添加中文语言
Re: 能否添加中文语言
Hi,
The whole Katakana has 62 glyphs (IIRC), and from what I know there is no Chinese alternative.
You can't change the font resolution.
There is also an extra step (to be implemented afterward), the header file containing all the language strings has to be encoded in a special way to be usable by the firmware.
Cheers.
---
Daniel
The whole Katakana has 62 glyphs (IIRC), and from what I know there is no Chinese alternative.
You can't change the font resolution.
There is also an extra step (to be implemented afterward), the header file containing all the language strings has to be encoded in a special way to be usable by the firmware.
Cheers.
---
Daniel
Re: 能否添加中文语言
In theory a 12x12 font could be added for Chinese, but it would require extensive changes to the firmware to handle a different number of characters across width of the screen.
So you would need to maintain a completely different version of the firmware, which had modified files for the entire user interface, as I don't think it would be practical to have #define's to control the number of changes needed to support a font with completely different width
So you would need to maintain a completely different version of the firmware, which had modified files for the entire user interface, as I don't think it would be practical to have #define's to control the number of changes needed to support a font with completely different width
Re: 能否添加中文语言
Thanks, I'm looking into how to make and use the char map table, my concern is how to store all those, or if I add char with higher res, that could take more spaces , i worry that will cause problem. maybe store into external rom is a better way. eg. generate the font map bin file, flash it using cps? this will take up external rom space and can have other impacts too.F1RMB wrote: ↑Wed Aug 10, 2022 9:18 amHi,
The whole Katakana has 62 glyphs (IIRC), and from what I know there is no Chinese alternative.
You can't change the font resolution.
There is also an extra step (to be implemented afterward), the header file containing all the language strings has to be encoded in a special way to be usable by the firmware.
Cheers.
---
Daniel
Re: 能否添加中文语言
Yea, after some further reasearch I understand what you mean, there will be many places need to be changed, but i'll see how far i can goVK3KYY wrote: ↑Wed Aug 10, 2022 10:14 amIn theory a 12x12 font could be added for Chinese, but it would require extensive changes to the firmware to handle a different number of characters across width of the screen.
So you would need to maintain a completely different version of the firmware, which had modified files for the entire user interface, as I don't think it would be practical to have #define's to control the number of changes needed to support a font with completely different width
Re: 能否添加中文语言
icz_tb wrote: ↑Thu Aug 11, 2022 2:24 amThanks, I'm looking into how to make and use the char map table, my concern is how to store all those, or if I add char with higher res, that could take more spaces , i worry that will cause problem. maybe store into external rom is a better way. eg. generate the font map bin file, flash it using cps? this will take up external rom space and can have other impacts too.F1RMB wrote: ↑Wed Aug 10, 2022 9:18 amHi,
The whole Katakana has 62 glyphs (IIRC), and from what I know there is no Chinese alternative.
You can't change the font resolution.
There is also an extra step (to be implemented afterward), the header file containing all the language strings has to be encoded in a special way to be usable by the firmware.
Cheers.
---
Daniel
I don't think ROM space would be a problem, becuase the Japanese version does not include the texts for any other languages except english, so there is a saving of 10k or more because of that.
Re: 能否添加中文语言
Thanks, this is encouraging, then i dont need to worry brick my radio
Did some further test, here is how it looks like, as said yesterday ,8x8 is not good enough , but it can show some . will try 12x12 next step, and think for menu display, that might cause a bit of overlap between displayed lines on the menu screen.
alternative way to get over this , is to see if can only display 2 lines of info on menu screen.
this might be an easier way to get this solved.
Did some further test, here is how it looks like, as said yesterday ,8x8 is not good enough , but it can show some . will try 12x12 next step, and think for menu display, that might cause a bit of overlap between displayed lines on the menu screen.
alternative way to get over this , is to see if can only display 2 lines of info on menu screen.
this might be an easier way to get this solved.
Re: 能否添加中文语言
Its almost impossible to brick the radio because the bootloader is never modified.
Re: 能否添加中文语言
Thats good to know! my knowledge to hardware /embedded device related programming is veryvery limited..
So far I've identifed around 100 characters, however this does not cover the full string used by the system, i have strong feeling that the 255 table is not enough.
beside the adjustment of UI render part will be a chanllange for me too..
Here's what i've got with 12x16 matrix font, strang thing is the bottom part of the char seems to be missing, no clue what /where it went wrong.. any ideas, suggestions pls?
Re: 能否添加中文语言
You have made amazing progress with this.
The reason the bottom of the character may be missing could be the Y position of each line being written to the screen
All the values for Y position of the lines of the menu are designed for the height of the English font
But I think that font is 8 x 16 (16 pixels tall), so 12 x 16 should be OK
Are you sure your font data is correct?
Also modify the menuSystem code to just draw one line to the screen and confirm that it displays OK.
You could also just change the main application file, to just write 1 line of text to the screen and do nothing else, so that you could check that the font data is OK.
If you need more than 255 characters its a bigger problem, because all the text is stored as single byte, not double byte characters.
So all the string handling won't work as there are many places where the string length is checked for 16 characters, and I don't think C natively handles double byte characters automatically.
The reason the bottom of the character may be missing could be the Y position of each line being written to the screen
All the values for Y position of the lines of the menu are designed for the height of the English font
But I think that font is 8 x 16 (16 pixels tall), so 12 x 16 should be OK
Are you sure your font data is correct?
Also modify the menuSystem code to just draw one line to the screen and confirm that it displays OK.
You could also just change the main application file, to just write 1 line of text to the screen and do nothing else, so that you could check that the font data is OK.
If you need more than 255 characters its a bigger problem, because all the text is stored as single byte, not double byte characters.
So all the string handling won't work as there are many places where the string length is checked for 16 characters, and I don't think C natively handles double byte characters automatically.
Re: 能否添加中文语言
Yea,you're right abt the font, i should use square ones. changed to 16x16 then it works without problem.
displaying 2 rows of menu item works,remove /change the menu title could make it look better though.
not perfect but useable . sub-menu items still have issues, due to the font size is much bigger, display ,and option setting can be an issue..16 char is for width8 char to my understanding...
there are ways to use more than 255 chars, however maybe that is not necessary due to the 16 char limition, have some english in sub-menu seems to be an good option
Maybe that's all that i can do for now, need more time to think and check if this breaks anything elsewhere.
Comparing to such changes, i 'm more interested to see if there is any hardware mod can be made to the radios to expand it's functionaility, eg. adding RTC chips to record the time!
Thanks for all your help!
displaying 2 rows of menu item works,remove /change the menu title could make it look better though.
not perfect but useable . sub-menu items still have issues, due to the font size is much bigger, display ,and option setting can be an issue..16 char is for width8 char to my understanding...
there are ways to use more than 255 chars, however maybe that is not necessary due to the 16 char limition, have some english in sub-menu seems to be an good option
Maybe that's all that i can do for now, need more time to think and check if this breaks anything elsewhere.
Comparing to such changes, i 'm more interested to see if there is any hardware mod can be made to the radios to expand it's functionaility, eg. adding RTC chips to record the time!
Thanks for all your help!