Age | Commit message (Collapse) | Author |
|
Allows us to render files with broken font hinting programs when hinting
is enabled(whether by no-AA or DynaLab detection).
Fix bug 692949.
|
|
|
|
See Bug 688655 for analysis of what we SHOULD be doing. The code changes
to do this are actually quite small.
Essentially, when we join we only draw the 'top' (or 'outer') join in a
join dependent way. The 'under' join was always joined as a bevel before
as this was easy. This produces bad effects when the lines have a
significant angle between them and a large linewidth.
The correct (i.e. matching Acrobat and others) way to work is to
join the bottom of the line via the centre point. The sole exception
to this is when drawing under beziers, as we don't want to make our
approximation-by-lines obvious.
All fixed in this patch.
|
|
Comment changes only.
|
|
If this is defined during building, we use our own sinf/cosf/atan2f
functions during shading. This is set automatically if CLUSTER is defined
too, so this should remove the cross-platform differences seen during
cluster rendering.
|
|
|
|
Use this to reintroduce "Document Properties..." in mupdf viewer.
|
|
Most of the changes mupdfclean makes to a file are purely textual
(streams are decompressed etc), but some objects can undergo changes
due to being read in, and then written out. Notably in this class
are floats. For instance, the mediabox in Bug689189.pdf contains
2125.984, which when written out with the current code gives 2125.98.
This is enough of a difference to cause rendering changes.
By upping the precision (instead of %g use, %1.9g) we get better
results; we now output 2125.9839, which is much closer (and in fact
has the same float representation when read back in).
This drastically reduces the differences between a rendering of
Bug689189.pdf and the uncompressed version, but we still have
differences - in shadings, it seems.
|
|
Restricts rendering to a sub rectangle of the supplied bbox.
|
|
In my previous commit, I forgot to initialise the variable before
using it. Thanks to Bas Weelinck for spotting this.
|
|
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.
|
|
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.
|
|
If compiled with -DDEBUG, cmapdump throws a large number of warnings
regarding thread locking. These are harmless and can be ignored, but
are, nonetheless, not pretty. Fixed here.
Thanks to Bas Weelinck for the report.
|
|
|
|
Currently the colorspace is selected on detecting -g, but may
then be overridden based on the filename; the -g option should
be given priority so the fix is simply to move the check for
-g down a few lines.
Thanks to James Cloos for spotting the problem and suggesting
the fix.
|
|
Don't reset the size of arrays until we have successfully resized them.
|
|
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.
|
|
While debugging Bug 692943, I spotted a case where we can attempt to
unlock the file while we don't hold the file lock due to an error
being thrown while we momentarily drop that lock. Simple solution
is to add a new fz_try()/fz_catch() to retake the lock in such
an error circumstance.
|
|
Put the logf call in it's own statement to fix a stupid header file
bug.
|
|
|
|
|
|
|
|
|
|
The link support still has several outstanding issues that need to be
solved.
|
|
|
|
|
|
|
|
|
|
The patterns can be used freely in both personal and commercial projects
with no attribution required, but always appreciated.
darkdenim3.png was made by Brandon Jacoby.
|
|
|
|
|
|
|
|
|
|
I had missed an umlaut, and misused a capital letter.
|
|
Mutual recursion was blowing the stack. This will still blow the
stack, but less often.
|
|
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.
|
|
|
|
Previously we attempted to honour page rotation values, which is
technically against the spec.
|
|
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.
|
|
Simple file to acknowledge major outside contributors.
|
|
Use 'i' to toggle inversion of the rendered MuPDF bitmap, giving
simple 'white on black' mode.
|
|
Simple fix to pdf app to 'fit width' and 'fit height' on W and H
respectively.
Thanks to eeva@marvid.fr for the patch.
|
|
This shuts up the spurious 'overflow' warnings when outputting
pages.
|
|
|
|
State that contexts are baked into devices, and devices used with
document should share the same context.
|
|
|
|
If -w and/or -h are used at the same time as -r, then treat -w and -h
as maximum width/height rather than absolute width/height.
|
|
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.
|
|
When coping with missing transparency entries, fill with 255,
not 0. Simplify code slightly so we fill completely, not just
to depth.
|
|
Previously MuPDF would add a newline at the end of every line.
As requested in the bug, we here avoid adding a final newline.
Unlike the suggested patch, we avoid adding one, rather than
removing one.
|