summaryrefslogtreecommitdiff
path: root/source/xps
AgeCommit message (Collapse)Author
2017-05-31Avoid double literals causing casts to float.Sebastian Rasmussen
2017-05-29Make PI/RADIAN/SQRT2/LN2 global single precision float constants.Sebastian Rasmussen
2017-05-23Remove unused strtod function.Tor Andersson
2017-04-27Avoid typecasting function pointers in subclasses.Tor Andersson
Do the typecasting in the functions instead, reducing the risk of function prototype mismatches.
2017-04-27Typedef function pointers consistently.Tor Andersson
2017-04-27Remove debug printing code.Tor Andersson
It's not used, so prone to bit rot. Better to purge it.
2017-04-27Include required system headers.Tor Andersson
2017-04-27Use fz_snprintf.Tor Andersson
2017-04-27Make HTML header private.Tor Andersson
2017-04-13Move extension/mimetype detection to common function.Sebastian Rasmussen
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.
2017-03-28Return fz_document from all document handlers.Sebastian Rasmussen
To make it possible to avoid casting in most cases.
2017-03-23Introduce fz_new_derived_...Robin Watts
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.
2017-03-22Update fz_new_page.Robin Watts
Move this into the same style as fz_new_document and fz_new_image.
2017-01-09Remove some dead code.Tor Andersson
2017-01-09Make fz_parse_xml take a fz_buffer. Make xps_part contain a fz_buffer.Tor Andersson
2017-01-09Add fz_terminate_buffer function.Tor Andersson
Non-destructively zero terminate a fz_buffer for use as a C string.
2016-11-14Make fz_buffer structure private to fitz.Robin Watts
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.
2016-11-14Add/fix page coordinates to link targets.Tor Andersson
Correctly transformed target coordinates for PDF. Target coordinates for EPUB and HTML.
2016-10-28Clean up link destination handling.Tor Andersson
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.
2016-10-19Move headers to make xps_document an internal type.Sebastian Rasmussen
2016-10-18Internal drop functions don't need to check for NULL.Sebastian Rasmussen
2016-10-18Avoid checking argument to fz_drop_*()/fz_free().Sebastian Rasmussen
As fz_drop_*()/fz_free() all must handle NULL.
2016-10-12Remove unused function.Tor Andersson
2016-10-12Bug 697012: Avoid overflow in xps_parse_real_num.Robin Watts
2016-10-12Always call fz_drop_document() to drop the document.Sebastian Rasmussen
2016-10-11Free document in fz_drop_document(), not in subclassing documents.Sebastian Rasmussen
2016-10-07Add ctx to fz_font functions.Robin Watts
2016-10-06Hide internals of fz_colorspaceRobin Watts
The implementation does not need to be in the public API.
2016-10-05Move fz_font definition to be private.Robin Watts
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.
2016-09-08EPUB and XPS may only be zip archives or directories.Sebastian Rasmussen
2016-08-30Use U+FFFD instead of '?' for bad encodings in text extraction.Tor Andersson
2016-08-24Bug 696983 - Fix bidirectional XPS spacing.Tor Andersson
Bidirectional setting was not accounted for when advance width was set in the XPS Indices Attribute.
2016-07-12xps: Only recognize <dir>/_rels/.rels type paths, not any .rels file.Tor Andersson
2016-07-08Separate close and drop functionality for devices and writers.Tor Andersson
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).
2016-06-17Use 'size_t' instead of int as appropriate.Robin Watts
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.
2016-06-14Fix typos in various parts of the code.Sebastian Rasmussen
2016-04-27Fix 696649: remove fz_rethrow_message calls.Tor Andersson
2016-04-05Clean up bidi enum names.Tor Andersson
And use the same enum for both the internal bidi code and the layout code.
2016-03-11Implement fz_text_language support functions.Robin Watts
Add code to convert to and from fz_text_language codes from ISO 639 language strings. No validation is carried out.
2016-03-11Rejig Bidirectional and Text code.Robin Watts
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).
2016-02-24Add fz_show_string function and move wmode argument to end.Tor Andersson
2016-02-24Add optional scissor hint argument to text clipping functions.Tor Andersson
2016-02-24Clarify scissor argument to clip device functions.Tor Andersson
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.
2016-02-22Rename fz_add_text to fz_show_glyph.Tor Andersson
Match naming of fz_moveto/lineto etc for paths.
2016-02-10Add bold/italic/monospaced/serif flags to fz_font.Tor Andersson
Use the flags when selecting a fallback font.
2015-12-15Rename fz_buffer_cat to fz_append_buffer.Tor Andersson
2015-12-11Remove text clip accumulation.Tor Andersson
We can now group all clipped text into one fz_text object and simplify the device interface.
2015-12-11Keep spans of multiple fonts and sizes in one fz_text object.Tor Andersson
2015-12-11xps: Simplify infinite loop check.Tor Andersson
2015-10-06xps: Add separate link parsing step.Tor Andersson
Don't rely on having to run the page once with an identity transform before being able to load the links.