Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] MuPDF Android font dir patch update #971

Merged
merged 3 commits into from
Sep 9, 2019

Conversation

Frenzie
Copy link
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
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
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
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
Member

Choose a reason for hiding this comment

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

Yep!

@@ -68,7 +68,7 @@ index f6951ba2..b1fdd981 100644
/*
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
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.

None yet

2 participants