Skip to content

Commit 3695751

Browse files
Apply patch to Fontforge localtime/gmtime patch. Enable all test PDFs.
1 parent d9d95fb commit 3695751

3 files changed

Lines changed: 25 additions & 9 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- lib/localtime-buffer.c 2019-12-21 17:35:27.182000000 -0000
2+
+++ lib/localtime-buffer.c 2019-12-21 17:40:50.952000000 -0000
3+
@@ -27,6 +27,12 @@
4+
static struct tm tm_zero_buffer;
5+
struct tm *localtime_buffer_addr = &tm_zero_buffer;
6+
7+
+# undef localtime
8+
+extern struct tm *localtime (time_t const *);
9+
+
10+
+# undef gmtime
11+
+extern struct tm *gmtime (time_t const *);
12+
+
13+
/* This is a wrapper for localtime.
14+
15+
On the first call, record the address of the static buffer that

dependency-builder/src/main/cpp/packages/libfontforge-Patch-Source.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,5 @@ patch $1/fontforge/noprefs.c $BASEDIR/libfontforge-Patch-Source-noprefs.patch
4949
# #define LC_GLOBAL_LOCALE __BIONIC_CAST(reinterpret_cast, locale_t, -1L)
5050
patch -p0 < $BASEDIR/libfontforge-Patch-Source-localeconv.patch
5151

52+
# rpl_localtime calls itself until stack exhaustion
53+
patch $1/lib/localtime-buffer.c $BASEDIR/libfontforge-Patch-Source-localtime-gmtime.patch

pdf2htmlEX/src/androidTest/java/com/viliussutkus89/android/pdf2htmlex/InstrumentedTests.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,16 @@ public class InstrumentedTests {
4545

4646
// PDFs must be places in pdf2htmlEX/src/androidTest/assets/
4747
private final String[] m_PDFsToTest = new String[] {
48-
// Commented out PDFs do not pass the conversion test, for one reason or another.
4948
"fontfile3_opentype.pdf",
50-
// "basic_text.pdf",
49+
"basic_text.pdf",
5150
"invalid_unicode_issue477.pdf",
52-
// "pdf.pdf",
53-
"sample.pdf"
54-
// "geneve_1564.pdf",
55-
// "svg_background_with_page_rotation_issue402.pdf",
56-
// "test_fail.pdf",
57-
// "with_form.pdf",
58-
// "text_visibility.pdf"
51+
"pdf.pdf",
52+
"sample.pdf",
53+
"geneve_1564.pdf",
54+
"svg_background_with_page_rotation_issue402.pdf",
55+
"test_fail.pdf",
56+
"with_form.pdf",
57+
"text_visibility.pdf"
5958
};
6059

6160
private File extractAssetPDF(String filename) throws IOException {

0 commit comments

Comments
 (0)