summaryrefslogtreecommitdiff
path: root/source/fitz/font.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-04-19 14:57:56 +0200
committerTor Andersson <tor.andersson@artifex.com>2018-04-25 12:26:33 +0200
commit73ce99685536764bf17dc097f5cba7208cd8f9c1 (patch)
tree4840bd0debf0160f1a0b48b2087162a5ad0a86c8 /source/fitz/font.c
parentc17e8a57934a863dc24476300d89e9483b9773e9 (diff)
downloadmupdf-73ce99685536764bf17dc097f5cba7208cd8f9c1.tar.xz
Don't use WMode as part of CJK font lookup.
Return TTC subfont index from fz_lookup_noto_font.
Diffstat (limited to 'source/fitz/font.c')
-rw-r--r--source/fitz/font.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/fitz/font.c b/source/fitz/font.c
index b92d40e9..badc7028 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -374,6 +374,7 @@ fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int se
fz_font **fontp;
const unsigned char *data;
int index;
+ int subfont;
int size;
if (script < 0 || script > nelem(ctx->font->fallback))
@@ -408,9 +409,9 @@ fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int se
*fontp = fz_load_system_fallback_font(ctx, script, language, serif, bold, italic);
if (!*fontp)
{
- data = fz_lookup_noto_font(ctx, script, language, serif, &size);
+ data = fz_lookup_noto_font(ctx, script, language, serif, &size, &subfont);
if (data)
- *fontp = fz_new_font_from_memory(ctx, NULL, data, size, 0, 0);
+ *fontp = fz_new_font_from_memory(ctx, NULL, data, size, subfont, 0);
}
}
@@ -646,11 +647,11 @@ fz_new_base14_font(fz_context *ctx, const char *name)
}
fz_font *
-fz_new_cjk_font(fz_context *ctx, int ordering, int serif, int wmode)
+fz_new_cjk_font(fz_context *ctx, int ordering, int serif)
{
const unsigned char *data;
int size, index;
- data = fz_lookup_cjk_font(ctx, ordering, serif, wmode, &size, &index);
+ data = fz_lookup_cjk_font(ctx, ordering, serif, &size, &index);
if (!data)
fz_throw(ctx, FZ_ERROR_GENERIC, "cannot find builtin CJK font");
return fz_new_font_from_memory(ctx, NULL, data, size, index, 0);