diff options
author | Tor Andersson <tor@ghostscript.com> | 2004-11-26 06:18:45 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2004-11-26 06:18:45 +0100 |
commit | b1d6ccb8fdefa7e3ea6cf5d894fbc54411257fb8 (patch) | |
tree | ce0c825cae2bee9a0d4a9245d3bc9af693d8fbba | |
parent | 9cc51e97453bffc0d984248e81544dcf5d776522 (diff) | |
download | mupdf-b1d6ccb8fdefa7e3ea6cf5d894fbc54411257fb8.tar.xz |
add language to fontconfig search pattern when looking for cid fonts
-rw-r--r-- | mupdf/fontfilefc.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mupdf/fontfilefc.c b/mupdf/fontfilefc.c index f5b8525f..ddcd4cfb 100644 --- a/mupdf/fontfilefc.c +++ b/mupdf/fontfilefc.c @@ -178,9 +178,28 @@ pdf_loadsystemfont(pdf_font *font, char *basefont, char *collection) /* pattern from name */ if (!FcPatternAddString(searchpat, FC_FAMILY, fontname)) goto cleanup; + if (collection) + { if (!FcPatternAddString(searchpat, FC_FAMILY, collection)) goto cleanup; + if (!strcmp(collection, "Adobe-GB1")) + if (!FcPatternAddString(searchpat, FC_LANG, "zh")) + goto cleanup; + if (!strcmp(collection, "Adobe-CNS1")) + if (!FcPatternAddString(searchpat, FC_LANG, "zh")) + goto cleanup; + if (!strcmp(collection, "Adobe-Japan1")) + if (!FcPatternAddString(searchpat, FC_LANG, "ja")) + goto cleanup; + if (!strcmp(collection, "Adobe-Japan2")) + if (!FcPatternAddString(searchpat, FC_LANG, "ja")) + goto cleanup; + if (!strcmp(collection, "Adobe-Korea1")) + if (!FcPatternAddString(searchpat, FC_LANG, "ko")) + goto cleanup; + } + if (style) if (!FcPatternAddString(searchpat, FC_STYLE, style)) goto cleanup; |