summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-22jni: Return correct quadpoints coordinates.Sebastian Rasmussen
2017-11-22jni: Return correct inklist coordinates.Sebastian Rasmussen
2017-11-22jni: Prevent memory leak by freeing upon error.Sebastian Rasmussen
Previously the counts and points arrays would leak if GetFloatArrayRegion() threw an exception.
2017-11-22jni: Clarify initialization order in Context.Sebastian Rasmussen
Previously the initialization order of init() and the field inited was not obvious. Move the static block as far up as possible but make sure that inited is initialized before that. Also add a comment explaining why.
2017-11-22js: Return undef when not finding metadata.Sebastian Rasmussen
Previously when metadata was not found mupdf still tried to return a string to the caller, but the string was uninitialized.
2017-11-22Add usage for missing options to pdf-write.Sebastian Rasmussen
2017-11-22Prefer using fz_snprintf over snprintf.Sebastian Rasmussen
This way the MuPDF library itself only uses fz_snprintf for consistent formatting.
2017-11-22Use custom allocator everywhere zlib is used.Sebastian Rasmussen
2017-11-22Warn on irretrievable glyph name.Sebastian Rasmussen
2017-11-22Update freeglut and change freeglut build output directory.Tor Andersson
It should be in "build/$release/thirdparty/freeglut".
2017-11-22Skip unnecessary newline when writing ASCII streams.Tor Andersson
2017-11-17Fix build if lcms2 is not present.Tor Andersson
We NEED lcms2art (the artifex branch) and cannot build with stock lcms2. Disable ICC support if the lcms2 thirdparty library is not present.
2017-11-17Purge remnants of GLFW.Tor Andersson
2017-11-15Bug 698740: Avoid NULL fz_default_colorspaces structures.Robin Watts
Remove code left over from development that is now wrong. We should have default colorspaces in the system, even in NON_ICC builds.
2017-11-15Bug 698745: Avoid broken colorspaces in NO_ICC builds.Robin Watts
If we attempt to make an icc colorspace in a NO_ICC build, throw an exception. This stops us ending up with 'UNKNOWN' colorspaces in the system.
2017-11-14Ensure that after_text functions get ctm.Robin Watts
Also wrap their contents in q/Q, so they can't screw up the rest of the stream.
2017-11-14Ensure filter inits the Trm values on a BT.Robin Watts
Otherwise we can get empty bbox values.
2017-11-14Rejig filter internals slightly.Robin Watts
Hold 2 instances of a structure, rather than a structure with 2 of each fields in it. Also, correct the logic for when we send color changes.
2017-11-13Update docs for Android SDK.Tor Andersson
2017-11-13docs: Put logo in title bar.Tor Andersson
2017-11-13docs: Don't shout in the navigation bar.Tor Andersson
2017-11-13Add sed script to update <nav> sections.Tor Andersson
2017-11-13Never draw Popup annotations.Tor Andersson
Popup annotations should never have an appearance stream, but in case they do we shouldn't draw them. The Open property is only to toggle whether the GUI should be showing the Content text editing in a Popup (or Text) annotation, and should not affect drawing the page.
2017-11-13gl: Fix GLUT build on MacOS X.Tor Andersson
2017-11-13gl: Make KEY_DELETE match actual ASCII DEL code.Tor Andersson
2017-11-13gl: Fix busy loop.Tor Andersson
glutMainLoopEvent does not sleep for events, so use glutMainLoop instead and destroy the window when 'q' is pressed rather than just setting the quit flag.
2017-11-13Bug 698369: Fix stroking issue when closepath is infinitessimal.Robin Watts
If the move due to a closepath is infinitessimal, fz_stroke_lineto skips it as it cannot accurately figure out what the direction is. It appears we have had some code in fz_stroke_closepath to cope with exactly this case, but it does the wrong thing. This dates back all the way to the initial import of the code, so presumably it worked at some point, and stopped working somewhere along the line.
2017-11-10Remove fz_android_fprintf.Tor Andersson
Use android logging for throw/warn like we do with OutputDebugString on windows.
2017-11-10Purge obsolete NDK_PROFILER code.Tor Andersson
2017-11-10Fix potential problem with null path segments leaving dots.Robin Watts
When stroking paths if we meet segments of 0 length, we can't determine a direction, thus start/end caps are omitted. Line widths are irrelevant, and we thus render nothing. (Note that moves on their own do NOT count as a line segment). The exception to this is where we are using round caps, whereupon whatever direction the path is taken to have, the appearance will be the same - and this we render the segment as a dot. We have code in the renderer already to do this, but it looks to me like it could be fooled into leaving a dot by us first doing a move, a lineto the same point, and then a lineto to somewhere else. The current code sets the 'dot' value to 1 when it detects the degenerate line, and doesn't reset when it meets a non-degenerate line later. Accordingly I've changed the code here to account for such a circumstance. This produces no diffs in the cluster testing, but seems more correct to me.
2017-11-10jni: Update for StructuredText highlight and copy changes.Tor Andersson
2017-11-10Remove unused variables.Tor Andersson
2017-11-10Update build docs to change HAVE_GLFW into HAVE_GLUT.Tor Andersson
2017-11-09Bug 698307: Improve stdint.h detection logic in openjpeg wrapper.Robin Watts
Thanks to Tamir Evan for this tweak.
2017-11-09Bug 698353: Avoid having our API depend on DEBUG/NDEBUG.Robin Watts
Currently, our API uses static inlines for fz_lock and fz_unlock, the definitions for which depend on whether we build NDEBUG or not. This isn't ideal as it causes problems when people link a release binary with a debug lib (or vice versa). We really want to continue to use static inlines for the locking functions as used from MuPDF, as we hit them hard in the keep/drop functions. We therefore remove fz_lock/fz_unlock from the public API entirely. Accordingly, we move the fz_lock/fz_unlock static inlines into fitz-imp.h (an internal header), together with the fz_keep_.../fz_drop_... functions. We then have public fz_lock/fz_unlock functions for any external callers to use that are free of compilications. At the same time, to avoid another indirection, we change from holding the locking functions as a pointer to a struct to a struct itself.
2017-11-09Avoid mu-office-lib calling fz_lock.Robin Watts
It was only ever calling fz_lock for its own lock. This was an abuse at best, and could potentially have caused trouble with the deadlock detection code. Instead, lock the same lock, but do so using custom (static) functions.
2017-11-09Fix windows build of GL app.Robin Watts
2017-11-09Squash warning.Robin Watts
2017-11-09VS2005: Fix Freeglut build.Robin Watts
2017-11-08Bug 698460: Mudraw: Set stdout to binary on windowsRobin Watts
2017-11-08Clean up and speed up text searching.Tor Andersson
2017-11-08Be a bit paranoid.Tor Andersson
We currently don't handle errors here, but if we do in the future we don't want stale pointers lying around.
2017-11-08Select and copy structured text by lines.Tor Andersson
2017-11-08Purge some obsolete MacOS X build stuff.Tor Andersson
2017-11-08gl: Remove GLFW and reinstate FreeGLUT.Tor Andersson
GLFW doesn't build on Visual Studio 2005 anymore, and I don't have time to keep up with the changes. So, we're switching back to FreeGLUT, which is more stable. I've added the two missing features that made us switch to GLFW in the first place: input methods and system clipboard support. If MuPDF is compiled with our version of FreeGLUT, we now use these functions: * glutKeyboardExtFunc * glutSetClipboard * glutGetClipboard
2017-11-08Remove broken bidi reordering code.Tor Andersson
TODO: Implement visual to logical reordering on the fly when building the structured text line.
2017-11-08Silence warning.Tor Andersson
2017-11-08Move static inline function out of header.Tor Andersson
2017-11-08Bug 698467: Honour resolution in text extraction.Robin Watts
This affects the given character bboxes.
2017-11-08Bug 698616: Fix use after free in Page_textAsHtmlRobin Watts