Age | Commit message (Collapse) | Author |
|
Without this we don't pick up FZ_ENABLE_GPRF from the header
correctly.
|
|
The upshot of debugging this is that:
1) We can't trust the FontBBox. Certainly it appears that no
one else trusts it.
2) We can't trust the d1 values in all cases, as it can lead to
use rendering glyphs far larger than we'd want to.
So we have the compromise used here.
1) We never clip to the FontBBox.
2) If the FontBBox is invalid, then we calculate the bbox
from the contents of the data streams.
3) If the FontBBox is valid, and the d1 rectangle given
does not fit inside it, then we calculate the bbox from
the contents of the data streams.
This could theoretically produce problems with glyphs that have
much more content than they actually need, and rely on the d1
rect to clip it down to sanity. If the FontBBox is invalid in
such fonts, we will go wrong.
It's not clear to me that this will actually work in Acrobat/
Foxit/gs etc either, so we defer handling this better until we
actually have an example.
Tested with bug 694952, and bug 695843 which were the last 2 in
this area.
|
|
|
|
The gproof device should make use of the output intent if
it exists.
|
|
In the gproof pipeline MuPDF first generates a skeleton file
with page sizes in. Then it gets gs to generate individual
pages for that file.
In one case, the pdf file has a height of 203.4 - at 300dpi
that's 847.5 device pixels. MuPDF was rounding that up to
848pixels, whereas gs was rounding it down to 847, causing
an error on load.
Adjust MuPDFs skeleton file generation so that it matches
gs.
|
|
MSVC is obviously more picky than linux in some cases.
|
|
Windows requires sys/stat.h to be included.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously it was inherently tied to zip archives and directories.
Now these are separated out into distinct subclasses. This prepares
for support for further archive formats.
|
|
By making the scope smaller fitz exceptions and Java exceptions
can be disentangled. This makes it clearer what happens in failure
cases.
|
|
|
|
If a large number of text spans uses a huge number of fonts
the JMV may run out of local references since we never cleaned
up the local reference to the font objects.
|
|
The Java arrays are the destination when reading from Buffer.
|
|
|
|
|
|
|
|
|
|
Adding to_Rect_safe(), to_jRectArray_safe(), to_ColorSpace_safe()
to_Image_safe() and to_Point_safe() disentangles fitz exceptions
from Java exception and also makes the code more uniform.
|
|
|
|
Including removal of unnecessary #ifdef.
|
|
|
|
|
|
Previously all exceptions thrown by the library would be converted
into checked exceptions, but there was no sensible response to
expect from a client.
|
|
|
|
|
|
Previously no fallbacks happened if the colorspace was not set, now gray
is assumed. The reason this is safe is that the softmasks backdrop color
entry is always filled with one component value (possibly being 0) matching
the gray component of the colorspace.
|
|
If there are no outlines, don't throw an error trying to
strip them.
|
|
Firstly, we avoid compressing streams if they get bigger.
Secondly, we ensure that we always update the Length field.
Seen as part of the investigation into bug 697092, though not the
actual cause. Thanks to Tor for the latter part of the fix.
|
|
In preference to colorspace internal to_rgb() function pointer.
|
|
|
|
The arguments will be freed by the finalizer of the object.
The finalizer for an object is called even if the constructor
throws an Exception or an OutOfMemoryError.
|
|
|
|
If an object reference is NULL the JVM will signal
NullPointerException before the JNI-code is executed.
|
|
The return value from CallObjectMethod() is not valid if an exception
is thrown, so check for exceptions before looking at the return value.
Mentioned at http://developer.android.com/training/articles/perf-jni.html
|
|
|
|
|
|
|
|
|
|
Fixes two compiler warnings.
|
|
|
|
We were only looking through the glyph name alias list for Type1 fonts.
Change the encodings for truetype to use the full glyph list alias list
as a fallback when the regular encoding by code point fails.
|
|
|