ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.58k stars 359 forks source link

support Chinese #7933

Open StrongZhu opened 9 months ago

StrongZhu commented 9 months ago

Your question

hi, does this version support Chinese?? As we known that there are Chinese of Heroes2. no only for game GUI, but also for the video, can find video in here : https://www.bilibili.com/video/BV14y4y1p7L6/

I tried to copied some maps of Chinese version to the folder, then started the game, it show "????" for all Chinese chars.

checked the source code quickly, seems that it load font from resource, then run 'Blt' to generate bitmap for char.... NOT sure SDL support Chinese char or not

Additional info

No response

ihhub commented 8 months ago

Hi @StrongZhu , as we know there were no official translation of Heroes of Might and Magic 2 for Chinese (Mandarin) by modifying an English version of the game on Windows. Also the engine does not support any UTF-8 characters at the moment.

Also we don't use SDL for image generation.

ihhub commented 8 months ago

@StrongZhu , on top of this to support Chinese there should be translation to Chinese. You cannot just grab a pirated version from the internet made for Windows and it would automagically work for fheroes2. Are you willing to provide full translation of the game for Chinese?

StrongZhu commented 8 months ago

hi, thanks for the resonse. I just want to re-use some maps files in Chinese, with this engine.

just checked the code again...seems that it load font info (BIGFONT.FNT/SMALFONT.FNT/etc.) from file 'HEROES2.AGG', 'HEROES2X.AGG', then calculate text lines/height/char width/etc,,,then build charSprites, then call fheroes2::Blit to build the image with text.... As the engine does NOT support UTF-8 char now...it's NOT easy to enhance it to support Chinese... Translation to Chinese is just the 1st step,,,still need corresponding font, must be of the proper size, ,,,etc..

I found one Chinese version the whole GUI, button, text windows, all related msg are all of Chinese, some screenshots can be found in here : https://tieba.baidu.com/p/7518562319

I believe there are font files for Chinese. The guy also made some enhancements, don't know how to achieve this without source code.

Thanks Sincerely.

ihhub commented 8 months ago

@StrongZhu , I had to remove your link. All piracy content is prohibited.