diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-06-23 16:41:18 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-06-29 11:10:07 +0200 |
commit | 954e3bb173c3302bf458875e86c49c712f0789d4 (patch) | |
tree | 4650ec1dc82717d9b29f5996ed72bf4e0bc9d516 /source | |
parent | cd100e900b4bd5de4fd9b5971a00fa7c280bcd7d (diff) | |
download | mupdf-954e3bb173c3302bf458875e86c49c712f0789d4.tar.xz |
Add Source Han Sans CJK per-language fonts.
Import fonts from v1.004.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/noto.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source/fitz/noto.c b/source/fitz/noto.c index 894d7bd6..0fdb5b9a 100644 --- a/source/fitz/noto.c +++ b/source/fitz/noto.c @@ -3,13 +3,15 @@ /* Base 14 PDF fonts from URW. Noto fonts from Google. + Source Han Sans from Adobe for CJK. DroidSansFallback from Android for CJK. Charis SIL from SIL. Define TOFU to only include the Base14 and CJK fonts. - Define TOFU_CJK to skip CJK font. - Define TOFU_CJK_EXT to skip CJK Extension A support. + Define TOFU_CJK_LANG to skip Source Han Sans per-language fonts. + Define TOFU_CJK_EXT to skip DroidSansFallbackFull (and the above). + Define TOFU_CJK to skip DroidSansFallback (and the above). Define TOFU_EMOJI to skip emoji font. Define TOFU_HISTORIC to skip ancient/historic scripts. @@ -133,7 +135,17 @@ fz_lookup_cjk_font(fz_context *ctx, int registry, int serif, int wmode, int *siz if (index) *index = 0; #ifndef TOFU_CJK #ifndef TOFU_CJK_EXT +#ifndef TOFU_CJK_LANG + switch (registry) { + case FZ_ADOBE_JAPAN_1: RETURN(SourceHanSansJP_Regular_otf); + case FZ_ADOBE_KOREA_1: RETURN(SourceHanSansKR_Regular_otf); + default: + case FZ_ADOBE_GB_1: RETURN(SourceHanSansCN_Regular_otf); + case FZ_ADOBE_CNS_1: RETURN(SourceHanSansTW_Regular_otf); + } +#else RETURN(DroidSansFallbackFull_ttf); +#endif #else RETURN(DroidSansFallback_ttf); #endif |