Skip to content
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

Merged
merged 8 commits into from
Oct 16, 2016
Merged

Add CJK Font fallback. #1058

merged 8 commits into from
Oct 16, 2016

Conversation

DBLobster
Copy link
Contributor

@DBLobster DBLobster commented Oct 13, 2016

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.
5 0
master
wqy

Edit by carstene1ns:
Fixes #260.

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
@Ghabry
Copy link
Member

Ghabry commented Oct 13, 2016

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 👍

@Ghabry
Copy link
Member

Ghabry commented Oct 13, 2016

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:
CMakeLists.txt, just add file to the filelist.

VIsual Studio:
builds/vs2015/PlayerLib.vcxproj
Add a "ClCompile" block

builds/vs2015/PlayerLib.vcxproj.filters
Add new "ClCompile" with Filter "Source Files\Shinonome"

@DBLobster
Copy link
Contributor Author

Thanks.

I updated CMake and Visual Studio files.

Copy link
Member

@Ghabry Ghabry left a 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.

@Ghabry
Copy link
Member

Ghabry commented Oct 14, 2016

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 ^^')

@Ghabry
Copy link
Member

Ghabry commented Oct 14, 2016

@carstene1ns any opinion on this?

@carstene1ns
Copy link
Member

IMO we are covered by the FE, Player renders the font unmodified and makes a (dynamically generated) document.
About the size: well, will only make problems on our constrained platform ports.

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.

@Ghabry Ghabry merged commit 692df1e into EasyRPG:master Oct 16, 2016
@Ghabry
Copy link
Member

Ghabry commented Oct 16, 2016

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.
I don't want to make custom builds, just a runtime switch :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add missing Chinese glyphs
4 participants