Age | Commit message (Collapse) | Author |
|
|
|
Fix for bug 697943.
Set the initial replacement font bbox to the empty rectangle for type3 fonts,
and let the type3 glyph loading initialize by taking the union of all glyph
bboxes.
Set the replacement font bbox for non-Type3 fonts to the unit rectangle.
Also remove unused flag from fz_font struct.
|
|
Add an option to the structured text device to preserve images.
If the PDF processor does not have ops to process images, then skip
loading them in the interpreter if possible. If the device does not
have any image callbacks, then don't set the image processing ops in
the run device.
This accomplishes the same effect as the device hints were intended
to do, but without needing to expose them to the PDF interpreter
which may not even have a device since we now have multiple PDF op
processors.
|
|
|
|
key_storable objects can either be freed 'directly' by an API call
(such as fz_drop_image), or 'internally' by the store realising that
the sole thing holding onto a key_storable is a key.
The current code frees more structure in the direct call than it
does in the internal call. Clearly this is wrong and leads to
leaks.
The fix is to do ALL the freeing in the internal 'drop' function
within the key_storable.
This means we don't need (or want) either fz_drop_key_storable_key or
fz_drop_key_storable to return an int to tell us whether they were
actually dropped, so we make that change to simplify the code.
This shifts the responsibility for freeing the extra internal
structure into the innermost drop functions - fz_drop_image_imp and
fz_drop_image_gprf_imp. To avoid duplicating code, we put the
extra freeing logic into a fz_drop_image_base function.
|
|
Define PATH_MAX in the few files that use it, should it be missing.
|
|
This causes zlib to look for a header we don't have.
|
|
|
|
It's not used, so prone to bit rot. Better to purge it.
|
|
Replace fz_print_hash with fz_hash_for_each iterator.
Use string formatting callback.
|
|
That's where it's actually being used.
|
|
Don't depend on stdio.h for our own I/O functions.
|
|
|
|
There is only one implementation, so don't bother with the abstraction.
Just use pdf_function directly.
|
|
|
|
Move the two SVG utility functions into fitz/util.h
|
|
|
|
|
|
|
|
PATH_MAX is Linux specific.
|
|
|
|
Don't use FMT_zu macro for fz_throw/fz_warn, since we can portably handle '%zu'
in our own printf formatting.
|
|
|
|
|
|
This makes is possible for JNI code to depend on the
library for error handling.
|
|
This allows for overlaps, merges adjacent (mergeable) ranges
and gets us properly searchable results.
This causes 1 diff in the test suites (Bug694353.pdf), which is
due to the fallback font not having a hypen present at UCS 0x2010.
|
|
|
|
A document handler normally only exposes a list of extensions and
mimetypes. Only formats that use some kind of extra detection mechnism
need to supply a recognize() callback, such as xps that can handle
.xps-files unpacked into a directory.
|
|
|
|
|
|
I can see no reason for having the reap lock now. We always
hold the ALLOC lock when we need it, so just live with that.
|
|
|
|
|
|
|
|
More consistent with the rest of the code.
|
|
In keeping with the rest of the code.
|
|
Fits with the rest of the code.
|
|
|
|
It seems odd for a document writer to pass a device pointer
out, and then require it to be passed back in.
Hide that in the public API.
|
|
Avoids needing to access the internals of reference counting.
|
|
There is no need to hold a separate flag to say that
we need reaping, when this can be implied from the
store_key_refs and the normal refcount being equal.
In addition, I don't think we were ever actually
setting this, so the code was wrong to start with.
|
|
|
|
This enables people to access (say) a PNG writer without
pulling in every single document writer at link time. (Of
course, currently, without function level linking, even now
we'll pull everything in, but we can improve this by
splitting source files up).
|
|
Instead of having fz_new_XXXX(ctx, type, ...) macros that call
fz_new_XXXX_of_size etc, use fz_new_derived_...
Clearer naming, and doesn't clash with fz_new_document_writer.
|
|
Moves document_writers into the same style as
fz_new_{image,document,page} etc.
|
|
Allow mutool convert to output all image formats we can write.
Add sanity checks for pbm and pkm writers.
|
|
|
|
Move this into the same style as fz_new_document and
fz_new_image.
|
|
Emit characters with callbacks so we don't need to do two passes using
vsnprintf to count, format, and copy the result.
|
|
Call fz_append_string instead of fz_append_printf for static strings.
Call fz_write_string instead of fz_write_printf for static strings.
|