summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-02-24xml: Implement SGML line break rules.Tor Andersson
Always ignore a line break immediately after an opening tag and before a closing tag.
2016-02-24html: Add support for soft hyphens in line breaking.Sebastian Rasmussen
2016-02-24html: Introduce a new line breaking algorithm.Sebastian Rasmussen
This algorithm can handle flow nodes that has non-zero width when they break a line of text. The previous algorithm could not handle this. This paves the way for supporting soft hyphens.
2016-02-24html: Split glue nodes into space and soft break nodes.Sebastian Rasmussen
This paves the way for supporting soft hyphens.
2016-02-24html: Fix typo.Tor Andersson
2016-02-24Add fz_new_image_from_file.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-22Fix leaks in pdf-device.cMichael Vrhel
The Forms object should have been dropped once the reference was created for it. Also needed to clean up the group and font objects that the device maintains.
2016-02-22Fix Annot handling in mutool clean.Robin Watts
When cleaning a file, we discard any Annot entries that no longer point to genuine pages. Or at least, we should have done, were it not for the fact that we only handled the /A form of Annots, and not the /Dest form of annots. Fixed here.
2016-02-22Fix flaw in printing objects.Robin Watts
When printing a PDF object to a file, if it was a name, then we'd output without a required \n. For example: 10 0 obj /SomeNameOrOtherendobj This would trip gs up.
2016-02-22Add some helpful debugging code to the mark and sweep code.Robin Watts
2016-02-22Rename fz_path_processor to fz_path_walker.Tor Andersson
2016-02-22Remove pointless casts from void*.Tor Andersson
Extraneous explicit type casts can mask errors, especially if a function prototype or return value changes in the future.
2016-02-22Drop const from fz_image.Tor Andersson
Image objects are immutable and opaque once constructed. Therefore there is no need for the const keyword.
2016-02-22Drop const from fz_shade.Tor Andersson
Shading objects are immutable and opaque once constructed. Therefore there is no need for the const keyword.
2016-02-22Rename fz_add_text to fz_show_glyph.Tor Andersson
Match naming of fz_moveto/lineto etc for paths.
2016-02-22html: Don't forget bold/italic when font-family is not set.Tor Andersson
2016-02-15Drop UNUSED macro -- it dirties the namespace and is not needed.Tor Andersson
We compile with -Wno-unused-parameters instead.
2016-02-15Convert line cap types to freetype linecap types properly.Tor Andersson
Don't just cast an enum to another.
2016-02-15Fix -DNOCJK build warnings.Tor Andersson
2016-02-12Fix PCL output (monochrome).Robin Watts
The PCL monochrome output code was unfinished. This now produces PCL accepted by ghostpcl for ljet4 and dj500 presets at least.
2016-02-12Bug 696580: Speed up fz_write_pnm_band.Robin Watts
Writing individual bytes using fwrite is VERY slow (profile of debug code shows 93% of runtime is in system fwrite). Fix this by collating into a buffer and writing (now 2.5%).
2016-02-12Inline fz_write function.Tor Andersson
2016-02-12Improve performance of fz_write of single bytes.Tor Andersson
Use putc for single byte writes instead of fwrite.
2016-02-12Add logo and icon image files.Tor Andersson
2016-02-11gl: Use fz_font instead of freetype directly.Tor Andersson
2016-02-10Add bold/italic/monospaced/serif flags to fz_font.Tor Andersson
Use the flags when selecting a fallback font.
2016-02-10Refactor node shaping code.Robin Watts
We walk the text in a node to shape it in 2 different places in the code. Reformulate the code so that the 'walking' logic is commoned up.
2016-02-10Fix hang in bidi directinality detection code.Tor Andersson
2016-02-10Add build=sanitize option to makefile.Tor Andersson
2016-02-10Add system harfbuzz pkg-config flags to makefile.Tor Andersson
2016-02-10html: Consider CJK punctuation in line breaking algorithmSebastian Rasmussen
2016-02-10html: Support vertical alignment to top/bottom of parent boxSebastian Rasmussen
Fixes http://bugs.ghostscript.com/show_bug.cgi?id=696004
2016-02-09Fix 696552: Double free error in mutool clean -s.Tor Andersson
Also fix a memory leak.
2016-02-09Don't use unsafe _snprintf on MSVC older than 2015.Tor Andersson
Wrap the unsafe _snprintf to ensure that the string is null-terminated even on overflow.
2016-02-04Make HTML layout use harfbuzz for shaping.Robin Watts
fz_fonts gain a 'shaper' field that will be filled in as required. Use a void * rather than an hb_font_t to avoid polluting top level include space. Harfbuff handles mirroring for us, so lose the 'mirror' fields. This simplifies our wrappers around the 'standard' bidi code in that we don't need to split fragments upon mirroring. We do need to split our fragments at script changes though as harfbuzz only operates on a single font at a time. Update the html flow structure so that each flow node contains details of the the direction specified for it in the markup, the language specified for it in the markup and the script detected by the bidi code. Get the bidi code to pass out the script for each fragment as part of the callback and populate that field in the node. Ensure that we pass in the markup direction to the bidi splitting code as the 'base' direction. When feeding the bidi code, rather than feeding it paragraphs at a time, break those paragraphs if different parts of them have different marked up directions.
2016-02-04Bug 696546: Minor tweaks to ftoa code.Robin Watts
Thanks to Simon Reinhardt for these.
2016-02-03Move pdf's lex_number routine over to use fast atof.Robin Watts
Spot (broken) values that will require special 'acrobat compatible' handling and use the old code for that.
2016-02-03Bug 696546: Add fast strtofRobin Watts
Take on a (slightly tweaked) version of Simon Reinhardt's patch. The actual logic is left entirely unchanged; minor changes have been made to the names of functions/types to avoid clashing in the cmapdump.c repeated inclusion. Currently this should really only affect xps files, as strtof is only used as fz_atof, and that's (effectively) all xps for now. I will look at updating lex_number to call this in future.
2016-02-02Fix Gproof DLL calling on windows.Robin Watts
Unadorned calling works on 64bit, but on 32bit we need to ensure that the gsapi functions are declared as __stdcall.
2016-01-29Update Android build with HarfbuzzRobin Watts
2016-01-29Force all harfbuzz allocations through our allocators.Robin Watts
Because of a shortcoming in harfbuzz, we can't easily force all its allocations through our allocators. We fudge it, with the addition of some macros to change malloc/free/calloc into hb_malloc/hb_free/hb_calloc. To prevent thread safety issues, we use our freetype lock around calls to harfbuzz. We stash the current context in a static var.
2016-01-28Add fallback font cache to font context.Tor Andersson
2016-01-28Add harfbuzz thirdparty submodule.Tor Andersson
2016-01-28Add Noto fallback fonts.Tor Andersson
Look up fallback fonts by unicode script, with a flag to select the serif or sans-serif font style where such variants exist. Move all builtin fonts into fitz namespace.
2016-01-28Import unhinted Noto fonts.Tor Andersson
2016-01-28Revert "Merge DroidSansHebrew and DroidSansArabic into DroidSansFallback."Tor Andersson
Fix TTC numbering in DroidSansFallback.ttc (H and V were swapped). Strip unused kerning tables.
2016-01-28Make (old) Win32 viewer honour user css file.Robin Watts
2016-01-28Tweak fontdump .incbin directive.Tor Andersson
Newer versions of clang supports .incbin, so enable it for clang. Disable .incbin for release builds, since then the compiler can strip out unused font data.