summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
63 min.post2-subsetting-bug-where-is-itHEADmasterSebastian Rasmussen
9 hoursIgnore encodings that are all zeroes in TTF font subsetting.Sebastian Rasmussen
Sometimes there are populated ones further down our encoding priority list. E.g non-symbolic encoding (1,0) might be all zeroes while encoding (0,3) contains data.
9 hoursHandle (0,3) encodings in TTF font subsetting.Sebastian Rasmussen
12 hoursdocs: Add description of quads returned when searching.Sebastian Rasmussen
12 hoursdocs: Rename class from XML to DOM.Sebastian Rasmussen
15 hoursdocs: Use lossless webp to shrink PNG images from 617KB to 142KB.Tor Andersson
Also keep the PNG files around, but apply zopfli optimization to shrink those down to 225KB. Remove text from MuPDF logo in sidebar.
15 hoursdocs: Tighten up styling.Tor Andersson
Use footer_icon to add Discord link. Remove redundant search field at top. The search field in the sidebar is enough. Clean up stylesheet: Removed sphinx_rtd_docs theme overrides that are not needed with Furo theme. Removed scroll offset trick that's not needed with Furo theme. Removed "cta" button styles that are unused.
16 hoursdocs: Clean up navigation structure.Tor Andersson
16 hoursdocs: Use rst_prolog and rst_epilog instead of header/footer/html_tags.Tor Andersson
Change TODO comments into actual comments, instead of invalid substitution definitions. Add "included" mutool-object-* files to exclusion list, so they aren't also built as standalone pages with duplicate definitions. Remove redundant mutool-run-js-api.rst page that was never referenced. The symbols it defined were duplicated in mupdf-js.rst. Include missing mutool-object-stroke-state.rst file that existed but wasn't linked into the documentation. This fixes most of the Sphinx build warnings.
31 hoursTweak detection of epub files.Robin Watts
Previously we detected the existence of META-INF/container.xml as being a 100% indication that we had an epub file. This is bad because HWPX files also have such files, and they contain content that make us much more sure that they are HWPX files - and we only score those as 75% to enable sodochandler to score them higher if it is enabled. Accordingly, reduce epubs confidence to 74%.
32 hoursBug 708489: Fix bugs in TTF subsetting.Robin Watts
When subsetting the POST table, we were omitting entries for glyphs that had to be included because they were used as composites. For example, in the given file, the ':' glyph uses the '.' glyph twice. The '.' glyph would otherwise be removed. I'm not sure if this actually causes a problem, but it's nicer to include it. The second issue, and the one that actually causes the problem is the regeneration of the cmap table. We were incorrectly checking the char id against the number of glyphs, rather than the maximum of the encoding. We were getting away with this as in most cases the number of glyphs is still quite large. In this example, however, we were dealing with a font that had already been subset. So the char id's were regularly larger than the number of glyphs in our "original" font.
32 hoursBug 708256: Tweak PDF string parsing of CR/LF/CRLF.Robin Watts
According to ISO 32000-1, all unescaped end-of-line markers within PDF string literals should all be interpreted as a single 0x0a byte.
32 hoursBug 708395: Fix a couple of issues with PCL output.Robin Watts
Firstly, when skipping blank lines, we were forgetting to increment the data file. This means that any colour output file that starts with a black link would just be printed empty. This fixes input1.pdf. Secondly, tweak the page margin setup code. I think we'd dropped a character from this setup at some point. For clarity, split the different commands to be separate and add comments.
33 hoursx11: Only allow changing font size in reflowable documents.Sebastian Rasmussen
Without this pressing '<' on an image will try to create a bookmark on that page, reflow the document and then go back to the bookmark which will fail.
34 hoursdocs: Set android config file language.Sebastian Rasmussen
2 daysjs/java/docs: Rename StrokeState.getDashes to getDashPattern.Sebastian Rasmussen
This better describes what it is and matches with the specification.
2 daysjs/java/docs: Rename Filespec to FileSpec to adhere to mupdf.js.Sebastian Rasmussen
2 daysdocs: Remove feedback link.Jamie Lemon
2 daysdocs: Improve documentation and tidy up tag usage.Sebastian Rasmussen
2 daysjs: Correct some typos in mutool run.Sebastian Rasmussen
Also mention a missing interface to be implemented later.
2 daysdocs: Update list of API changes.Sebastian Rasmussen
5 daysdocs: Fix warnings/errors when compiling the documentation.Sebastian Rasmussen
5 daysjs/java: Add interfaces to decode/encodes barcodes.Sebastian Rasmussen
5 daysjs/java: Add interfaces to create invalid, empty and infinite rects.Sebastian Rasmussen
5 daysjs: Fix bug in isInfinite implementation.Sebastian Rasmussen
5 daysExport the invalid rect definition.Sebastian Rasmussen
5 daysjs: Fix incorrectly named function.Sebastian Rasmussen
5 daysdocs: Add missing documentation for mutool barcode.Sebastian Rasmussen
7 daysdocs: Add new thirdparty modules to tarball script.Sebastian Rasmussen
7 daysRemember to add new thirdparty modules to tarball script.Sebastian Rasmussen
7 daysDetect HAVE_GLUT setting from pkg-config by default.Tor Andersson
7 daysFix whitespace in FreeText annotation (Bug701889.pdf).Tor Andersson
7 daysBug 708292: Tweak ObjStm repairs.Robin Watts
When we repair a file, we: 1) Ditch all the objects. 2) Scan through the file lexing for objects and reading them in 3) During this scan if we encounter a second or subsequent version of an object, we keep that one in preference to any previous one. 4) Once we've scanned the objects, we then run through the xref looking for ObjStm objects. 5) For every ObjStm object we encounter, we run through it creating xref entries for each object in the ObjStm. 6) We are at pains to never allow an Object in an ObjStm to override an object that appears after it in the file. This was originally done to guard against incremental updates that override an object in an ObjStm with a normal object, but as this file shows, it can also help us guard against objects in ObjStms being replaced with other objects in ObjStms. 7) We then run through the file ensuring that all objects that claim to be in ObjStms really point to objects that are ObjStms. As part of the check in step 6) we were looking up the offset for a given objstm object, and asserting that it was an objstm. This bug is caused by the assert triggering. As we process the example file, we first encounter object 2, an objstm that contains object 5. This is no problem. We then encounter object 6 that contains both object 2 and object 5. Processing object '2' changes object '2' from being an objstm to being an object in an objstm. When we process object 5, we lookup the existing definition, expecting it to be within an objstm - but object 2 is no longer such. This causes the assert. If we had just continued through, we'd have been fine, as stage 7) would have removed any bad entries at the end. The fix is to remove the assert, and handle it as a special case.
7 daysTweak rich content singleline layout to match plain content layout.Tor Andersson
7 daysAlways set LCMS2_PREFIX if we are building with a non-system lcms.Robin Watts
7 daysUpdate lcms2 submodule to get LCMS2MT_PREFIX functionality.Robin Watts
7 daysBug 708456: Loosen test for PDF trailer Size being correct.Robin Watts
Allow for it being off by 1 in more cases (not just in the case where it's the XRef object that isn't being accounted for). Maybe we shouldn't repair on broken values at all, and just live with it?
8 daysBug 708455: Handle case in ps functions where integers cause a floating ↵Sebastian Rasmussen
point exception. This happens when computing INT_MIN / -1, that is -2147483648 / -1, which ought to result in 2147483648. Unfortunately that result is larger than INT_MAX. Approximate the result by setting it to INT_MAX.
8 dayssvg: Fix use loop detection in svg parser.Sebastian Rasmussen
This was accidentally broken by an earlier commit, that is f7ac5cbc6a3adfe8d0855ee221d738fe88ab2e4e.
8 daysgl: Handle unknown annotation intent.Sebastian Rasmussen
8 daysUpdate lcms2 to fix problem seen with icc_rendering_intent.pdfRobin Watts
8 daysTake note of Intent field in PDF Images.Robin Watts
This is supposed to override the intent in the graphics state. Update fz_image objects to note whether we have an intent, and if so, what it is. Update the calls from the PDF interepreter into the rendering code to use these values. This means that we retain the ability in the device interface to display an image with a different intent to that which is specified, as this seems more general.
8 daysRework how the local graphics state is handled in svg parser.Tor Andersson
Always call svg_begin_state to make a "local" copy of the state that is safe to mutate. This clones the stroke state. Then call svg_end_state to clean up (dropping the stroke state clone).
8 daysFix typo in Makethird USE_SYSTEM_GLUT=yes case.Tor Andersson
8 daysAdd a simple make variable to turn off all of the html engine parts.Tor Andersson
9 daysscripts: Disable brotli in release test all disabled build.Sebastian Rasmussen
9 daysEnsure that the list device stroke state is not reused when creating display ↵Sebastian Rasmussen
list nodes. Previously the stroke state passed to fz_stroke_path() was kept in the list device, which meant that its values could be changed under the feet of the list device. Now we always clone the stroke state before storing it in the list device. Before commit 5576bba26c0fe38243b25365c6b0faf0638114b5 the stroke state allocated in svg_state was fz_default_stroke_state which has refs == -2, so when the fz_append_list_node() called fz_keep_stroke_state() it had a special case for refs == -2, causing it to be cloned, instead of kept. After commit 5576bba26c0fe38243b25365c6b0faf0638114b5, svg_state did not use the special fz_default_stroke_state, but a normal default stroke state created by fz_new_stroke_state. This is almost identical to fz_default_stroke_state, except that refs is == 1 (instead of -2). This means that when fz_append_list_node() calls fz_keep_stroke_state() it will NOT clone the stroke state, but instead just increment refs. The consequence of this that the stroke state left in the list device is now the same reference as used by the caller. This means that the called may change stroke state properties without the list device knowing. Later on when passed the modified stroke state to fz_stroke_path(), which later ends up in fz_append_list_node(), the pointer to the modified stroke state is compared to that in the list device. These pointers are of course the same, so the decision is to not embed another stroke state into the display list node, even though the stroke state properties have changed! The fix is to always make a clone of the stroke state when embedding it into a display list node. Thereby the list device stroke state pointer will differ from the one passeed in by the caller through fz_stroke_state() and therefore a new stroke state will be embedded into the display list node, similar to how it used to be when the svg parsed depended on fz_default_stroke_state. Also add stroke state comparison function for use in display list device. Previously the display list used pointers to compare two stroke states, but stroke state pointers are often differen while their contents are the same, leading display lists containing redundant stroke states. By comparing the stroke state properties, display list nodes will only contain stroke states in case their properties have actually changed.
9 dayssvg: Clone stroke state when cloning svg state.Sebastian Rasmussen
Now that the stroke state is used by reference the parent's stroke state will be polluted by the child's modifications. This was not the case before because the stroke state was copied in its entirety upon entry to each function, e.g. svg_run_rect(), svg_run_circle(), etc.
9 daysDeclare stroke state const in fz_clone_stroke_state.Sebastian Rasmussen
9 daysSilence warning when using strlen on short string literals.Tor Andersson