summaryrefslogtreecommitdiff
path: root/source/fitz
AgeCommit message (Collapse)Author
2016-01-21epub: Put font fallback chain in fz_font.Tor Andersson
fz_encode_character_with_fallback finds the first font in the fallback chain that has the glyph encoded, and if none do then try to encode a bullet character.
2016-01-21Drop the const on fz_font.Tor Andersson
The font is an immutable opaque structure, no need to add the const keyword since users aren't expected or expecting to change it.
2016-01-20Various formatting cleanups.Tor Andersson
2016-01-20Tidy bidirectional source.Robin Watts
Make the import follow mupdf style (better, if not perfect). Use ucdn where possible to avoid duplicating tables. Shrink the types, make them explicit (e.g. use fz_bidi_level rather than int) and make tables const. Use 32-bit integers for text.
2016-01-18Process HTML text for directionality.Robin Watts
After we parse html text from an ebook run it through the unicode bidirectional algorithm to determine the directionality of each fragment. This may require splitting of fragments. Currently we don't do anything with this information.
2016-01-18First import of bidi code.Robin Watts
2016-01-18Add consts to fz_keep/drop_path.Robin Watts
Forgot these in my previous pass.
2016-01-18Simplify try/catch macros.Tor Andersson
Use a pointer to the top error stack slot instead of access via array and index. Return the stack slot from fz_push_try.
2016-01-13Add lots of consts.Robin Watts
In general, we should use 'const fz_blah' in device calls whenever the callee should not alter the fz_blah. Push this through. This shows up various places where we fz_keep and fz_drop these const things. I've updated the fz_keep and fz_drops with appropriate casts to remove the consts. We may need to do the union dance to avoid the consts for some compilers, but will only do that if required. I think this is nicer overall, even allowing for the const<->no const problems.
2016-01-08Add pool allocator.Tor Andersson
2016-01-08Use a binned cache for font encoding lookups.Tor Andersson
It's slower, but will work for CJK fonts as well.
2016-01-08Optimize font advance and encoding caches.Tor Andersson
2016-01-08pdf: Fix pdf_annot memory leak.Tor Andersson
2016-01-08Fix conditional jump or move depends on uninitialised value.Tor Andersson
stm.avail_out is only set if !only_metadata. Reverse the order of the if tests to silence valgrind.
2016-01-06Squash some warningsRobin Watts
2016-01-06epub: Cache font encoding lookups.Tor Andersson
Add a caching table for the lower planes of unicode, which cover the latin, greek, cyrillic, hebrew and arabic scripts.
2016-01-05Separate pdf_drop_annots (that drops lists) and fz_drop_annot.Tor Andersson
2016-01-05Add pixmap struct accessors.Tor Andersson
2016-01-05Clean up trailing whitespace.Tor Andersson
2016-01-05Change fz_ftoa to fz_grisu to remove one extra layer of function calls.Tor Andersson
2016-01-05Speed up fz_ftoa.Simon Reinhardt
During pdf_save_document the main performance bottleneck is the formatting of floats to decimal ASCII representations in fz_ftoa. Fix this by using the Grisu2 algorithm, the fastest known algorithm for accurate printing of IEEE floating point numbers while minimizing the number of produced decimal digits. This requires no libc support, only integer arithmetic.
2016-01-05epub: Speed up font layout by caching freetype advance widths.Tor Andersson
2016-01-05Clarify snprintf length when printing to fz_buffer and fz_output.Tor Andersson
The +1's for zero terminating bytes are not needed: printf to a fz_buffer or fz_output does not write a zero terminator. The extra code to add space for a zero terminator when calling snprintf internally are merely confusing.
2016-01-05Remove fz_page argument from fz_annot function calls.Tor Andersson
2015-12-28Rename fz_image_get_pixmap to fz_get_pixmap_from_image.Tor Andersson
2015-12-18Rename fz_image_get_sanitised_res to fz_image_resolution.Tor Andersson
2015-12-18Remove fz_save_document and use pdf_save_document directly instead.Tor Andersson
In preparation of adding pdf_write_document that writes a document to a fz_output stream.
2015-12-18Rename fz_halftone_pixmap to fz_new_bitmap_from_pixmap.Tor Andersson
2015-12-15Rename fz_buffer_cat to fz_append_buffer.Tor Andersson
2015-12-15Rename fz_output_x to fz_write_pixmap_as_x etc.Tor Andersson
2015-12-15Rename fz_write_x to fz_save_pixmap_as_x or fz_save_bitmap_as_x.Tor Andersson
Separate naming of functions that save complete files to disk from functions that write data to streams.
2015-12-14Add fz_clone_pathRobin Watts
Will be required for JNI bindings.
2015-12-14Add fz_clone_textRobin Watts
Will be required for JNI bindings.
2015-12-14Add 'const' to the context lock and alloc structure pointers.Robin Watts
This highlights the fact that we never alter the internals, and allows callers to pass in static const pointers.
2015-12-14Add user context field.Robin Watts
This may help the MuPDF JNI code, so it's likely to be useful for other users too.
2015-12-14Fix signed/unsigned warning.Robin Watts
Seen with MSVC.
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-11Rename structured text structs and functions to 'stext'.Tor Andersson
Less risk of confusion with the text type used in the device interface.
2015-12-11Use fz_output instead of FILE* for most of our output needs.Tor Andersson
Use fz_output in debug printing functions. Use fz_output in pdfshow. Use fz_output in fz_trace_device instead of stdout. Use fz_output in pdf-write.c. Rename fz_new_output_to_filename to fz_new_output_with_path. Add seek and tell to fz_output. Remove unused functions like fz_fprintf. Fix typo in pdf_print_obj.
2015-12-11Fix warning about unused functions.Tor Andersson
2015-12-11Use strerror for more detailed error messages.Tor Andersson
2015-10-29Fix 696303: Off-by-one error when checking for exception stack overflow.Tor Andersson
2015-10-14Scale colors of JPEG2000 images with bit depths less than eight.Tor Andersson
2015-10-06Never squish a substitute font to zero width, in case of broken font metrics.Tor Andersson
2015-10-05Use FT_Get_Advance in glyph width scaling calculations.Tor Andersson
2015-10-02Don't stretch CJK substitute fonts.Tor Andersson
2015-10-02Fix 696148: Always create a glyph width table.Tor Andersson
Respect default widths when creating the glyph width table.
2015-10-02Reference count fz_outline struct.Robin Watts
2015-10-02fz_link fixes.Robin Watts
Make fz_link reference counting threadsafe. Remember to free dests of GOTO links. Accordingly, ensure that XPS does not create links with uninitialised dests.