summaryrefslogtreecommitdiff
path: root/fitz
AgeCommit message (Collapse)Author
2012-04-23Fix whitespace and indentation.Tor Andersson
2012-04-20Pass UTF8 filename to fz_open_document / fz_open_file to remove kludges.Tor Andersson
Use _wopen on a UTF8 -> wchar_t decoded filename to support UTF8 filenames for win32.
2012-04-19Change fz_document_open to assume PDF format by default.Robin Watts
Previously, we would only open files with the correct extension. Until such time as we get file type detection by contents working assume that any file that doesn't end in .xps or .cbz is a pdf file.
2012-04-19Retry loading a hinted glyph without hinting if freetype returns an error.Tor Andersson
Allows us to render files with broken font hinting programs when hinting is enabled(whether by no-AA or DynaLab detection). Fix bug 692949.
2012-04-18Note that the fz_meta interface is subject to change.Robin Watts
Comment changes only.
2012-04-17Add Meta interface to fz_document.Robin Watts
Use this to reintroduce "Document Properties..." in mupdf viewer.
2012-04-10Add fz_new_draw_device_with_bbox functionRobin Watts
Restricts rendering to a sub rectangle of the supplied bbox.
2012-04-09Fix use of uninitialised variable.Robin Watts
In my previous commit, I forgot to initialise the variable before using it. Thanks to Bas Weelinck for spotting this.
2012-04-09Bug 692979: Fix race condition in thread debugging.Robin Watts
Bas Weelinck points out a potential problem with multiple threads starting up at the same time, running into a race condition in the thread debugging code. He suggests using an extra lock to avoid this, and indeed, it would be a simple way. I am reluctant to introduce an extra lock purely for this case though, so I've instead reused the ALLOC lock. This has the advantage of us not having to take the lock except in the 'first call with a new context' case.
2012-04-09Bug 692976: Fix spurious thread lock debug warnings on context clonesRobin Watts
When cloning, ensure the locks are done on the new context, not the old one; this makes no difference except to suppress some spurious debugging messages. Also ensure that DEBUG is predefined for Makefile based debug and memento builds. Thanks to Bas Weelinck.
2012-04-05Fix potential problems on malloc failure.Robin Watts
Don't reset the size of arrays until we have successfully resized them.
2012-04-05Bug 692946 - fix 'stray white pixels in black areas' when halftoning.Robin Watts
Depending on the operation used (< or <=) the threshold array should never have either 0 and ff in it. As we are using <, it should never have 0 in it. Fixed here.
2012-03-28Add documentation for fz_link_dest and text extraction device.Robin Watts
2012-03-28Warn that the fz_link_dest struct is not finished.Tor Andersson
2012-03-28Whitespace fixes.Tor Andersson
2012-03-21Update iOS app.Tor Andersson
2012-03-19Fix typo in text device where lines would group into blocks too eagerly.Tor Andersson
The default page userspace transform changed to a top-down coordinate space, and I forgot this detail when updating the text device branch. Also remove the final block sorting pass to give preference to the original PDF text order.
2012-03-19Don't create empty spans and lines in the text device.Tor Andersson
2012-03-19Bug 692746; avoid 'double palettes' on jpx images.Robin Watts
It seems that JPX images can be supplied in indexed format, with both a palette internal to the jpx stream, and a palette in the PDF. Googling seems to suggest that the internal palette should be ignored in this case, and the external palette applied. Fortunately, since OpenJPEG-1.5 there is a flag that can be used to tell OpenJPEG not to decode palettes. We update the code here to spot that there is an external palette, and to set this flag.
2012-03-16Bug 692805: BBox rounding issuesRobin Watts
Currently all conversions from rect to bbox are done using a single function, fz_round_rect. This causes problems, as sometimes we want 'round, allowing for slight calculation errors' and sometimes we want 'round slavishly to ensure we have a bbox that covers the rect'. We therefore split these 2 cases into 2 separate functions; fz_round_rect is kept, meaning "round outwards allowing for slight errors", and fz_bbox_covering_rect is added to mean "give us the smallest bbox that is guaranteed to cover rect". No regressions seen.
2012-03-15Fix 2 regressions in xps test files due to palette change.Robin Watts
When coping with missing transparency entries, fill with 255, not 0. Simplify code slightly so we fill completely, not just to depth.
2012-03-15Bug 692911: Cope with over/undersize palette entries in pngs.Robin Watts
If entries are larger than they need to be, accept just the amount we need. If not large enough, pad out with zeros.
2012-03-14Bug 692917: Move to dynamic stroke_states.Robin Watts
Move fz_stroke_state from being a simple structure whose contents are copied repeatedly to being a dynamically allocated reference counted object so we can cope with large numbers of entries in the dash array.
2012-03-14When bounding paths, only apply miterlimit when mitering.Robin Watts
From SumatraMuPDF.patch - Many thanks.
2012-03-14Ignore trailing movetos in path bounding calculations.Robin Watts
Taken from SumatraPDF.patch - Many thanks.
2012-03-14Implement Repeat and Reflect gradients in XPS.Tor Andersson
Thanks to SumatraPDF for the patch.
2012-03-14Some fixes to the new text device, courtesy of Zeniko.Tor Andersson
2012-03-14Put 'lastchar' into the text device struct to remember what theTor Andersson
last character was across style changes.
2012-03-14Fix memory leaks in style sheet handling of the new text device.Tor Andersson
2012-03-14Use correct linejoins on font with modern enough freetype.Robin Watts
2012-03-14Fix memory leak in image_tiffRobin Watts
When we have finished replacing tiff->samples, free the old samples block. Taken from Sumatra.patch - many thanks.
2012-03-14Free doc links without recursionRobin Watts
Taken from Sumatra.patch - Many thanks.
2012-03-13Merge master and pg_android branchesRobin Watts
Bring up to date with current APIs, including text device changes.
2012-03-13Make fz_print functions all take a FILE *.Robin Watts
Also tidy up the taking of fz_context *'s, and hide an unwanted indent param.
2012-03-13Fix building on windows.Robin Watts
Fix a couple of silly problems (one gccism, and one windows specific bug).
2012-03-13Add ctx argument and rename fz_bound_pixmap to fz_pixmap_bbox.Tor Andersson
2012-03-13Rename some functions and accessors to be more consistent.Tor Andersson
Debug printing functions: debug -> print. Accessors: get noun attribute -> noun attribute. Find -> lookup when the returned value is not reference counted. pixmap_with_rect -> pixmap_with_bbox. We are reserving the word "find" to mean lookups that give ownership of objects to the caller. Lookup is used in other places where the ownership is not transferred, or simple values are returned. The rename is done by the sed script in scripts/rename3.sed
2012-03-13Split XPS header. Update Makefile dependencies. Add pixmap w/h accessors.Tor Andersson
2012-03-12Create style sheet and group extracted text into blocks, lines and spans.Tor Andersson
2012-03-12Move fz_alloc_default to internal header.Tor Andersson
2012-03-12Merge branch 'header-split'Robin Watts
2012-03-12Store AA level used to render a glyph in the glyphcache.Robin Watts
In the existing code, glyphs are stored/retrieved from the glyphcache with no reference to the antialias level used to create them. This means that if we are using different aa levels in different threads, we can retrieve 'non-matching' glyphs and hence get rendering indeterminisms. Fixed simply here by storing the aa level in the glyphcache too.
2012-03-12More API work.Robin Watts
Details of buffers hidden in fitz-internal.h. Public API now just lets us keep/drop and get storage details for a buffer. fz_debug_outline{,_xml} lose the 'level' param in their public API. fz_matrix_max_expansion hidden, as it's only used internally. Document fz_setjmp/fz_longjmp and Apple specific hackery.
2012-03-12Change order of params in fz_convert_color to C standard.Robin Watts
C's standard is copy(dst, src), so we move to adopt that here. Hopefully no one is calling this routine other than us - if they are, then I apologise! Better to aim for consistency before we freeze the API at v1.0 than to carry an inconsistent API around ever after.
2012-03-12Change order of params in fz_convert_pixmap to C standard.Robin Watts
C's standard is copy(dst, src), so we move to adopt that here. Hopefully no one is calling this routine other than us - if they are, then I apologise! Better to aim for consistency before we freeze the API at v1.0 than to carry an inconsistent API around ever after.
2012-03-12Merge branch 'master' into header-splitRobin Watts
2012-03-12Test both coordinates when checking for empty/infinite rect and bboxes.Sebastian Rasmussen
2012-03-12Clamp real numbers when parsing.Sebastian Rasmussen
Instead of returning in 1.0 for underflow/overflow, return minimum value for underflow and maximum value for overflow. NaN returns 1.0.
2012-03-12Take care of boundary conditions in ps function evaluation.Sebastian Rasmussen
Floating point numbers are now clamped, division by zero is approximated by minimum or maximum value and NaN results in 1.0.
2012-03-12More API tidying.Robin Watts
Make fz_clone_context copy existing AA settings. Add accessor function for fz_bitmap. Add more documentation for various functions/types.