Skip to content

Commit

Permalink
mupdf 1.23.6
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-pierre committed Nov 29, 2023
1 parent 7762656 commit 04db08b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion base/ffi/mupdf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local mupdf = {
}
-- this cannot get adapted by the cdecl file because it is a
-- string constant. Must match the actual mupdf API:
local FZ_VERSION = "1.23.5"
local FZ_VERSION = "1.23.6"

local document_mt = { __index = {} }
local page_mt = { __index = {} }
Expand Down
8 changes: 4 additions & 4 deletions subprojects/mupdf.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[wrap-file]
directory = mupdf-1.23.5
source_url = https://github.com/ArtifexSoftware/mupdf/archive/refs/tags/1.23.5.tar.gz
source_hash = 70b3e95c855b12683d35278374dbb4e9293a3d8b355bf57927df0b991e37f5b7
source_filename = mupdf-1.23.5.tar.gz
directory = mupdf-1.23.6
source_url = https://github.com/ArtifexSoftware/mupdf/archive/refs/tags/1.23.6.tar.gz
source_hash = 203d2c6e5fd0354485a8b6654577fdbbb83e810de42950845df7a18aa8e8fca5
source_filename = mupdf-1.23.6.tar.gz
patch_directory = mupdf/overlay
diff_files =
mupdf/fix-share-jpeg-build.patch,
Expand Down
19 changes: 13 additions & 6 deletions subprojects/packagefiles/mupdf/external-fonts.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h
--- a/include/mupdf/fitz/font.h
+++ b/include/mupdf/fitz/font.h
@@ -742,4 +742,9 @@ struct fz_font
@@ -743,4 +743,9 @@ struct fz_font
int subfont;
};

Expand All @@ -14,7 +14,7 @@ diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h
diff --git a/source/fitz/font.c b/source/fitz/font.c
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -474,11 +474,8 @@ fz_font *fz_load_system_fallback_font(fz_context *ctx, int script, int language,
@@ -475,11 +475,8 @@ fz_font *fz_load_system_fallback_font(fz_context *ctx, int script, int language,
fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int serif, int bold, int italic)
{
fz_font **fontp;
Expand All @@ -26,7 +26,7 @@ diff --git a/source/fitz/font.c b/source/fitz/font.c

if (script < 0 || script >= (int)nelem(ctx->font->fallback))
return NULL;
@@ -512,6 +509,10 @@ fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int se
@@ -513,6 +510,10 @@ 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)
{
Expand All @@ -37,7 +37,7 @@ diff --git a/source/fitz/font.c b/source/fitz/font.c
data = fz_lookup_noto_font(ctx, script, language, &size, &subfont);
if (data)
{
@@ -519,6 +520,11 @@ fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int se
@@ -520,6 +521,11 @@ fz_font *fz_load_fallback_font(fz_context *ctx, int script, int language, int se
/* Noto fonts can be embedded. */
fz_set_font_embedding(ctx, *fontp, 1);
}
Expand Down Expand Up @@ -77,9 +77,9 @@ diff --git a/source/fitz/noto.c b/source/fitz/noto.c
}

const unsigned char *
@@ -348,3 +352,173 @@ fz_lookup_noto_emoji_font(fz_context *ctx, int *size)
@@ -354,3 +358,180 @@ fz_lookup_noto_boxes_font(fz_context *ctx, int *size)
{
return search_by_script_lang(size, NULL, MUPDF_SCRIPT_EMOJI, FZ_LANG_UNSET);
return search_by_family(size, "Nimbus Boxes", REGULAR);
}
+
+#else // NOBUILTINFONT
Expand Down Expand Up @@ -232,6 +232,13 @@ diff --git a/source/fitz/noto.c b/source/fitz/noto.c
+ return NULL;
+}
+
+const unsigned char *
+fz_lookup_noto_boxes_font(fz_context *ctx, int *size)
+{
+ *size = 0;
+ return NULL;
+}
+
+fz_font *
+fz_load_system_fallback_font_from_file(fz_context *ctx, int script, int language, int serif, int bold, int italic)
+{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/source/html/html-doc.c b/source/html/html-doc.c
--- a/source/html/html-doc.c
+++ b/source/html/html-doc.c
@@ -28,6 +28,11 @@ static void
@@ -50,6 +50,11 @@ static void
htdoc_drop_document(fz_context *ctx, fz_document *doc_)
{
html_document *doc = (html_document*)doc_;
Expand Down
2 changes: 1 addition & 1 deletion subprojects/packagefiles/mupdf/overlay/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'mupdf',
['c', 'cpp'],
version: '1.23.5',
version: '1.23.6',
default_options: 'c_std=gnu11',
)

Expand Down
6 changes: 3 additions & 3 deletions subprojects/packagefiles/mupdf/visibility.patch
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h
/* forward declaration for circular dependency */
struct fz_device;

@@ -659,6 +661,8 @@ float fz_font_descender(fz_context *ctx, fz_font *font);
@@ -660,6 +662,8 @@ float fz_font_descender(fz_context *ctx, fz_font *font);
*/
void fz_font_digest(fz_context *ctx, fz_font *font, unsigned char digest[16]);

Expand All @@ -145,7 +145,7 @@ diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h
/* Implementation details: subject to change. */

void fz_decouple_type3_font(fz_context *ctx, fz_font *font, void *t3doc);
@@ -745,6 +749,7 @@ struct fz_font
@@ -746,6 +750,7 @@ struct fz_font
char *get_font_file(char *name);
char *fz_lookup_base14_font_from_file(fz_context *ctx, const char *name);
char *fz_lookup_cjk_font_from_file(fz_context *ctx, int registry, int serif, int wmode);
Expand Down Expand Up @@ -265,7 +265,7 @@ diff --git a/include/mupdf/fitz/stream.h b/include/mupdf/fitz/stream.h
/**
Return true if the named file exists and is readable.
*/
@@ -594,6 +596,8 @@ static inline int fz_is_eof_bits(fz_context *ctx, fz_stream *stm)
@@ -615,6 +617,8 @@ static inline int fz_is_eof_bits(fz_context *ctx, fz_stream *stm)
return fz_is_eof(ctx, stm) && (stm->avail == 0 || stm->bits == EOF);
}

Expand Down

0 comments on commit 04db08b

Please sign in to comment.