summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2004-11-26 06:18:45 +0100
committerTor Andersson <tor@ghostscript.com>2004-11-26 06:18:45 +0100
commitb1d6ccb8fdefa7e3ea6cf5d894fbc54411257fb8 (patch)
treece0c825cae2bee9a0d4a9245d3bc9af693d8fbba
parent9cc51e97453bffc0d984248e81544dcf5d776522 (diff)
downloadmupdf-b1d6ccb8fdefa7e3ea6cf5d894fbc54411257fb8.tar.xz
add language to fontconfig search pattern when looking for cid fonts
-rw-r--r--mupdf/fontfilefc.c19
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;