Skip to content

Commit

Permalink
catch up mupdf master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
chrox committed Aug 19, 2014
1 parent ee036fa commit 48e46a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ $(MUPDF_LIB): $(JPEG_LIB) $(FREETYPE_LIB)
LDFLAGS="$(LDFLAGS) -L../$(OUTPUT_DIR)" \
XCFLAGS="$(CFLAGS) -DNOBUILTINFONT -fPIC -I../jpeg -I../$(FREETYPE_DIR)/include" \
CC="$(CC)" \
build="release" MUDRAW= MUTOOL= NOX11=yes \
build="release" MUDRAW= MUTOOL= CURL_LIB= \
OS="Other" verbose=1 \
FREETYPE_DIR=nonexisting \
JPEG_DIR=nonexisting \
Expand Down
2 changes: 1 addition & 1 deletion mupdf
Submodule mupdf updated from b2f096 to d189e8
16 changes: 8 additions & 8 deletions mupdf.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c
index c6dc712..82385a4 100644
index 5ac722f..84222b3 100644
--- a/source/pdf/pdf-font.c
+++ b/source/pdf/pdf-font.c
@@ -188,7 +188,12 @@ pdf_load_builtin_font(fz_context *ctx, pdf_font_desc *fontdesc, char *fontname,
Expand Down Expand Up @@ -29,11 +29,11 @@ index c6dc712..82385a4 100644
fontdesc->font->ft_italic = italic && !ft_is_italic(fontdesc->font->ft_face);
}
@@ -235,7 +245,12 @@ pdf_load_substitute_cjk_font(fz_context *ctx, pdf_font_desc *fontdesc, char *fon
fz_throw(ctx, FZ_ERROR_GENERIC, "cannot find builtin CJK font");

/* The DroidSansFallback fonts have both H and V variants in the TTC */
/* A glyph bbox cache is too big for DroidSansFallback (51k glyphs!) */
/* A glyph bbox cache is too big for CJK fonts. */
+#ifndef NOBUILTINFONT
fontdesc->font = fz_new_font_from_memory(ctx, fontname, data, len, fontdesc->wmode, 0);
fontdesc->font = fz_new_font_from_memory(ctx, fontname, data, len, index, 0);
+#else
+ fontdesc->font = fz_new_font_from_file(ctx, fontname, data, 0, 1);
+ free(data);
Expand All @@ -42,7 +42,7 @@ index c6dc712..82385a4 100644

fontdesc->font->ft_substitute = 1;
diff --git a/source/pdf/pdf-fontfile.c b/source/pdf/pdf-fontfile.c
index 2e33768..070c331 100644
index f0787bc..45ceedf 100644
--- a/source/pdf/pdf-fontfile.c
+++ b/source/pdf/pdf-fontfile.c
@@ -14,6 +14,8 @@
Expand All @@ -54,7 +54,7 @@ index 2e33768..070c331 100644
#ifdef NOCJK
#define NOCJKFONT
#endif
@@ -151,3 +153,116 @@ pdf_lookup_substitute_cjk_font(int ros, int serif, unsigned int *len)
@@ -153,3 +155,116 @@ pdf_lookup_substitute_cjk_font(int ros, int serif, int wmode, unsigned int *len,
return NULL;
#endif
}
Expand Down Expand Up @@ -160,10 +160,10 @@ index 2e33768..070c331 100644
+}
+
+unsigned char *
+pdf_lookup_substitute_cjk_font(int ros, int serif, unsigned int *len)
+pdf_lookup_substitute_cjk_font(int ros, int serif, int wmode, unsigned int *len, int *index)
+{
+ *len = 0;
+ return get_font_file("droid/DroidSansFallback.ttf");
+ return get_font_file("droid/DroidSansFallback.ttc");
+}
+
+void pdf_install_load_system_font_funcs(fz_context *ctx)
Expand Down

0 comments on commit 48e46a9

Please sign in to comment.