Skip to content

[fix] MuPDF Android font dir patch update#971

Merged
Frenzie merged 3 commits intokoreader:masterfrom
Frenzie:mupdf-patch-android
Sep 9, 2019
Merged

[fix] MuPDF Android font dir patch update#971
Frenzie merged 3 commits intokoreader:masterfrom
Frenzie:mupdf-patch-android

Conversation

@Frenzie
Copy link
Copy Markdown
Member

@Frenzie Frenzie commented Sep 9, 2019

@Frenzie Frenzie requested a review from NiLuJe September 9, 2019 14:33
@Frenzie Frenzie added the bug label Sep 9, 2019
+char *
+get_font_file_android(char *name)
+{
+ char *fontdir;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

	const char fontdir[] = "/system/fonts";
	size_t len = sizeof(fontdir) + strlen(name) + 1;	// sizeof on a string literal includes the NUL
	char *filename = malloc(len);
	if (filename == NULL) {
		return NULL;
	}

(Fairly minor, this works ;)).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure I tested with what I thought of as a stress test (EPUB) but I guess that just used the Times (or whatever) that's bundled with MuPDF. In any case I didn't have any HTML dictionaries installed on the emulator.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're fine with the basic principle besides this nit? :-P

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep!

Base 14 PDF fonts from URW.
Noto fonts from Google.
@@ -367,3 +371,185 @@ fz_lookup_noto_emoji_font(fz_context *ctx, int *size)
@@ -367,3 +371,188 @@ fz_lookup_noto_emoji_font(fz_context *ctx, int *size)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NiLuJe Apparently I thought your suggestion took off more lines than it did? :-P Oh well, luckily there's the CI.

@Frenzie Frenzie merged commit b7dd4c1 into koreader:master Sep 9, 2019
@Frenzie Frenzie deleted the mupdf-patch-android branch September 9, 2019 16:29
Frenzie added a commit to Frenzie/koreader that referenced this pull request Sep 9, 2019
koreader/koreader-base#971

Fixes <koreader#5347 (comment)>.

Also includes:
* [feat] Add FFI RTC interface (koreader-base#969)
* Bump thirdparty/djvulibre to current master (koreader-base#970)
Frenzie added a commit to koreader/koreader that referenced this pull request Sep 9, 2019
koreader/koreader-base#971

Fixes <#5347 (comment)>.

Also includes:
* [feat] Add FFI RTC interface (<koreader/koreader-base#969>)
* Bump thirdparty/djvulibre to current master (<koreader/koreader-base#970>)
Frenzie added a commit to Frenzie/koreader-base that referenced this pull request Nov 21, 2019
Frenzie added a commit that referenced this pull request Nov 21, 2019
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants