Age | Commit message (Collapse) | Author |
|
Move the definition of the structure contents into new fitz-imp.h
file. Make all code outside of fitz access the buffer through the
defined API.
Add a convenience API for people that want to get buffers as
null terminated C strings.
|
|
Correctly transformed target coordinates for PDF.
Target coordinates for EPUB and HTML.
|
|
All link destinations should be URIs, and a document specific function
can be called to resolve them to actual page numbers.
Outlines have cached page numbers as well as string URIs.
|
|
|
|
|
|
As fz_drop_*()/fz_free() all must handle NULL.
|
|
|
|
|
|
|
|
|
|
|
|
The implementation does not need to be in the public API.
|
|
Move the definition of fz_font to be in a private header file
rather than in the public API. Add accessors for specific
parts of the structure and use them as appropriate.
The font flags, and the harfbuzz records remain public.
This means that only 3 files now need access to the font
implementation (font.c, pdf-font.c and pdf-type3.c). This
may be able to be improved further in future.
|
|
|
|
|
|
Bidirectional setting was not accounted for when advance width was set
in the XPS Indices Attribute.
|
|
|
|
Closing a device or writer may throw exceptions, but much of the
foreign language bindings (JNI and JS) depend on drop to never throw
an exception (exceptions in finalizers are bad).
|
|
This silences the many warnings we get when building for x64
in windows.
This does not address any of the warnings we get in thirdparty
libraries - in particular harfbuzz. These look (at a quick
glance) harmless though.
|
|
|
|
|
|
And use the same enum for both the internal bidi code and the layout code.
|
|
Add code to convert to and from fz_text_language codes from
ISO 639 language strings. No validation is carried out.
|
|
We move to using bidirectional "levels" throughout. This should
give us better behaviour vis-a-vis nested l2r/l2r text. This
also allows us to carry xps levels throughout with no loss of
information.
This also avoids the need to special case numbers.
We accordingly carry more information into fz_text.
As well as wmode, also hold additional details about the text spans.
We now include the directionality of the bidi level text (either as
derived from bidi code, or from the original document (e.g. xps)),
the directionality of text (as specified in the original document
(e.g. html)), and the language of the text (if specified in the
original document).
|
|
|
|
|
|
The scissor argument is an optional (potentially NULL) rectangle
that can give hints to devices about the area that can be scissored.
This is used by the draw device and display list device to minimize
the size of temporary clip mask buffers.
The scissor rectangle, if used, must have been transformed by the
current transform matrix.
|
|
Match naming of fz_moveto/lineto etc for paths.
|
|
Use the flags when selecting a fallback font.
|
|
|
|
We can now group all clipped text into one fz_text object and simplify
the device interface.
|
|
|
|
|
|
Don't rely on having to run the page once with an identity transform
before being able to load the links.
|
|
For use in a later link parsing refactoring commit.
|
|
|
|
|
|
Make fz_link reference counting threadsafe.
Remember to free dests of GOTO links. Accordingly, ensure that XPS
does not create links with uninitialised dests.
|
|
|
|
|
|
Bug 696061 showed GhostXPS crashing with a SEGV. Checking MuPDF
showed that a fix had already been applied here, but Memento
shows that the fix was causing a leak.
We therefore patch the leak here.
|
|
Add fz_has_permission function to fz_document.
Add fz_lookup_metadata function to fz_document.
Remove fz_meta function from fz_document.
|
|
Firstly, we make the definition of the path structures local to
path.c. This is achieved by using an fz_path_processor function to
step through paths enumerating each section using callback functions.
Next, we extend the internal path representation to include other
section types, including quads, beziers with common control points
rectangles, horizontal, vertical and degenerate lines. We also roll
close path sections up into the previous sections commands.
The hairiest part of this is that fz_transform_path has to cope with
changing the path commands depending on the matrix. This is a
relatively rare operation though.
|
|
|
|
fz_open_file does not return NULL on failure -- it throws an exception!
|
|
Purge several embedded contexts:
Remove embedded context in fz_output.
Remove embedded context in fz_stream.
Remove embedded context in fz_device.
Remove fz_rebind_stream (since it is no longer necessary).
Remove embedded context in svg_device.
Remove embedded context in XML parser.
Add ctx argument to fz_document functions.
Remove embedded context in fz_document.
Remove embedded context in pdf_document.
Remove embedded context in pdf_obj.
Make fz_page independent of fz_document in the interface.
We shouldn't need to pass the document to all functions handling a page.
If a page is tied to the source document, it's redundant; otherwise it's
just pointless.
Fix reference counting oddity in fz_new_image_from_pixmap.
|
|
Rename fz_close to fz_drop_stream.
Rename fz_close_archive to fz_drop_archive.
Rename fz_close_output to fz_drop_output.
Rename fz_free_* to fz_drop_*.
Rename pdf_free_* to pdf_drop_*.
Rename xps_free_* to xps_drop_*.
|
|
|
|
Disallow modification of shared fz_path and fz_text objects.
They should follow a create once, consume often pattern, and as such should
be immutable once created.
|
|
Starting with commit 2f4cdd4fd0580e3121773e89a7c6e7a9e1ffa54b,
xps_read_part zero-terminates the read data. It does however also count
that zero-terminator to the part's size which confuses callers handling
non-text data.
|