-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CJK Font fallback. #1058
Add CJK Font fallback. #1058
Conversation
wenquanyi_9pt.bdf: GPL v2 (with font embedding exception) bdfmerge.pl: Public Domain See: http://wenq.org/ https://sourceforge.net/projects/wqy/files/wqy-bitmapfont/1.0.0-RC1/ from wqy-bitmapsong-bdf-1.0.0-RC1.tar.gz
./bdfmerge.pl 0x4E00--0x9FCB wenquanyi_9pt.bdf > wenquanyi_cjk_basic_9pt.bdf 0x4E00--0x9FFF is section of Unicdoe CJK Basic. WenQuanYi(wqy) is Unicode 5.2 fonts, so 0x4E00--0x9FCB.
./gen_wqy_font_cpp.py
I'm not a lawyer so I can't say if GPLv2 with Font embedding exception is incompatible to GPLv3+. I was worried about another thing: We plan to relicense the Player with a GPL Linking Exception which would be incompatible to GPLv2+FontEmbedding but you putted the fonts in a different file so for such a GPL-incompatible build we could just ifdef out that part 👍 |
Updating the other platform files is simple. Most platforms just compile all cpp files they can find, except CMake and Windows (Visual Studio). Where to add the files: VIsual Studio: builds/vs2015/PlayerLib.vcxproj.filters |
Thanks. I updated CMake and Visual Studio files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. What do the other devs think? Unfortunately it makes the executable 500kbyte hugher but on the other hand it solves all our CJK font problems.
The fallback code is also nice because this allows us to use a different font file for chinese games, otherwise they get japanese kanjis.
Tested via the chinese wadanohara game. Works for me on Windows and Linux (though not in Wine but that's not our problem) and all glyphs are displayed (can't say if the correct ones, lack of Chinese knowledge, so I trust the dev here ^^') |
@carstene1ns any opinion on this? |
IMO we are covered by the FE, Player renders the font unmodified and makes a (dynamically generated) document. Off topic: We already have a lot included in the executable, but leaving things out and making it modular is a big task and having different builds around (for example one for Chinese, one for Western and one for Japanese with different fonts) will make everything more complicated for now. |
With different font files I meant the embedded ones. When a chinese game is used we could use WenQuanYi instead of shinonome for kanji lookup because WenQ has chinese kanji font. |
Hi, I add a WenQuanYi 9pt font to resolve missing CJK glyphs.
WenQuanYi font is GPL v2 (with font embedding exception).
I only update automake script. Can someone update other platform build script?
Thanks.
Edit by carstene1ns:
Fixes #260.