summaryrefslogtreecommitdiff
path: root/platform/win32
AgeCommit message (Collapse)Author
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-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 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-18First import of bidi code.Robin Watts
2016-01-13VS Solution: Add fz_pool files.Robin Watts
2015-12-28Drop 'jsimp' abstraction and use mujs directly.Tor Andersson
2015-12-22Update jbig2dec to latest.Robin Watts
In particular this takes on the Memento fixes for bug 696183.
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-11win32: Always build 'generated' in 32-bit mode.Tor Andersson
Otherwise we can't run file generation tools with a 64-bit target on a 32-bit host.
2015-11-12gl: Add x64 target to MSVC project files.Tor Andersson
2015-10-14gl: Fix win32 release mode build.Tor Andersson
Always build with the 'windows' subsystem and use WinMain. Turn on USE_OUTPUT_DEBUG_STRING to capture fz_warn and fz_throw error messages.
2015-10-06Update freetype submodule to version 2.6.1.Tor Andersson
2015-10-06gl: Windows stuff.Tor Andersson
* Add icons to application and window. * Open file dialog if no command line argument. * Install file type associations.
2015-10-06gl: Split text field handling into separate file and add keyboard focus.Tor Andersson
2015-10-06gl: Add an internal header file for GL application.Tor Andersson
2015-10-06gl: Fix MSVC warnings.Tor Andersson
2015-10-06gl: Use GLFW instead of GLUT.Tor Andersson
Add OpenGL text rendering using textured quads, instead of using glut bitmap fonts.
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.
2015-09-28Workaround for VS2005 linker bug.Robin Watts
Disable the use of link time code creation. I don't believe this costs us much (if anything) and it avoids VS2005 dying on release builds due to a bug triggered by the use of 64bit fz_off_t.
2015-09-14Add utility functions to help reduce device creation boilerplate.Tor Andersson
2015-08-24Revert revert of WinMain utf-8 handling and fix the bugs.Tor Andersson
Also fix a few ifdefs in time.c so that it builds on MinGW.
2015-08-17Revert "win32: Convert argv to utf-8 and use regular getopt."Robin Watts
Neatness doesn't override actually working. This reverts commit efb5a38ca0bac3537ceaf3383681a518df133143.
2015-07-31win32: Convert argv to utf-8 and use regular getopt.Tor Andersson
Easier than duplicating getopt for wchar_t, since we already have windows specific functions to convert wchar_t strings.
2015-07-30Add load-gif.c to visual studio projectMichael Vrhel
Windows build was broken with commit 642a59a4de683a1359733229943be285e3e45c4f
2015-07-20Code to generate a GProof file from a currently opened document.Robin Watts
Given a document, generate a gproof file from it. This encapsulates the name of the file, the desired resolution for proofing, and the page dimensions of all the pages in the file. The idea is that an app will call this when it is asked to go into 'proofing' mode, and will reinvoke itself on this file. This gives the gprf document handler just enough information to fake up a document of n pages of the required sizes. Each page will then be autogenerated on demand.
2015-07-20First cut at gprf document handler.Robin Watts
Doesn't actually trigger generation from ghostscript, or load images from files generated by ghostscript yet.
2015-06-29Add Separation class to fitz.Robin Watts
Simple set of functions for managing sets of separations. Separations have names, equivalent rgb/cmyk colors, and can be enabled/disabled.
2015-06-29Add an fz_tempfile utility.Robin Watts
This will be required for the gprf work.
2015-06-26Bug 696053: Update windows mupdf to respect command line flags.Robin Watts
Previously, only the unix executable had been updated to take command line flags; update the windows one in line with it. We have to cope with the argv being in Unicode; add a windows specific version of getoptw for this. Also note that that fprintf's in the windows mupdf exe won't work as GUI apps don't have a console window, and can't write to the parent one. Fixing that is a larger project than I have time for right now.
2015-06-03Enable FZ_LARGEFILE for all windows builds.Robin Watts
People worrying about the minimal extra memory this takes can disable it if required.
2015-06-02Ensure that we can still build mudraw standalone if we want to.Robin Watts
MUDRAW_STANDALONE forces mudraw_main to be just main. Set this in the mudraw VS project.
2015-05-25Update VS solution with mutool changes.Robin Watts
mudraw.c must be included into mutool.
2015-05-07Add some missing headers to MSVC solution.Robin Watts
2015-04-09Remove the _no_run functions.Tor Andersson
The new pdfclean sanitize functionality mean that mutool now needs the data files, so maintaining the split that was designed to keep data files out of mutool is no longer viable.
2015-04-06Add mutool pages subcommand.Robin Watts
Inspired by bug 695823. Mutool can now dump the sizes and orientations for pages within a given file.
2015-04-06Move the guts of pdfclean into the lib.Robin Watts
Michael needs to be able to call pdfclean from gsview. At the moment he's having to do this by including the pdfclean.c file into the lib build, and then calling pdfclean_main with a faked up command line. This isn't nice. pdfclean.c is implemented by pdfclean_main parsing the options/filenames out of argv and then passing the filenames/options on to a pdfclean_clean function. This seems like a much nicer API to offer to the world. We therefore pull the guts of pdfclean.c (pdfclean_clean and its subsidiary structures/functions) into pdf-clean-file.c and include this in the library build. This leaves pdfclean.c just as the command line parsing. This should not affect the size of any of the resulting binaries.
2015-03-24Rework handling of PDF names for speed and memory.Robin Watts
Currently, every PDF name is allocated in a pdf_obj structure, and comparisons are done using strcmp. Given that we can predict most of the PDF names we'll use in a given file, this seems wasteful. The pdf_obj type is opaque outside the pdf-object.c file, so we can abuse it slightly without anyone outside knowing. We collect a sorted list of names used in PDF (resources/pdf/names.txt), and we add a utility (namedump) that preprocesses this into 2 header files. The first (include/mupdf/pdf/pdf-names-table.h, included as part of include/mupdf/pdf/object.h), defines a set of "PDF_NAME_xxxx" entries. These are pdf_obj *'s that callers can use to mean "A PDF object that means literal name 'xxxx'" The second (source/pdf/pdf-name-impl.h) is a C array of names. We therefore update the code so that rather than passing "xxxx" to functions (such as pdf_dict_gets(...)) we now pass PDF_NAME_xxxx (to pdf_dict_get(...)). This is a fairly natural (if widespread) change. The pdf_dict_getp (and sibling) functions that take a path (e.g. "foo/bar/baz") are therefore supplemented with equivalents that take a list (pdf_dict_getl(... , PDF_NAME_foo, PDF_NAME_bar, PDF_NAME_baz, NULL)). The actual implementation of this relies on the fact that small pointer values are never valid values. For a given pdf_obj *p, if NULL < (intptr_t)p < PDF_NAME__LIMIT then p is a literal entry in the name table. This enables us to do fast pointer compares and to skip expensive strcmps. Also, bring "null", "true" and "false" into the same style as PDF names. Rather than using full pdf_obj structures for null/true/false, use special pointer values just above the PDF_NAME_ table. This saves memory and makes comparisons easier.
2015-03-20Fix Win32 builds of MuPDF; freetype config options not found.Robin Watts
Fred had updated a path in an include file. The Makefiles cope with this, the VS solution does not.
2015-03-12VS solution: bring x64 libmupdf into line with other files.Robin Watts
The lib was being built in an odd place.
2015-02-25Add 64 bit windows builds to MSVC solution.Robin Watts
A few casts are required within the code, along with a few #ifdef changes. Some tweaks to curl are required too.
2015-02-24Update MSVC solution with html entries. Fix windows issues with html.Robin Watts
Add the new source files to the solution. Windows builds whinge about float->double conversions. Fix these with explicit casts. Avoid calling strtof and strcasecmp.
2015-02-17Add ctx parameter and remove embedded contexts for API regularity.Tor Andersson
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.
2015-02-05Fix makefile dependencies (gen_font_droid.h is no more).Tor Andersson
2014-12-03Add ZIP file and directory reading module.Tor Andersson
2014-09-22Fix 695467: Add and use fz_ftoa function (like dtoa but with floats).Tor Andersson
The dtoa function is for doubles (which is what MuJS uses) but for MuPDF we only need and want float precision in our output formatting.
2014-09-16Add missing file to VS solution.Robin Watts
Without this, we fail to find jpeg_cust_mem_init at link time on Windows.
2014-09-09Fix accidental commit of VS 12 changesMichael Vrhel
2014-09-09Fix crashes, add annotations, more AA control, Keyboard commands, select ↵Michael Vrhel
all plus more. Includes xml, html, text save as, fix issues in window range that determines what pages are visible at a particular scaling. Fix very tricky to find problem in interface with gs. Managed code was freeing delegates that were allocated dynamically. It is not possible to pin these so they are now member variables.
2014-09-02Add locale-independent number formatting and parsing functions.Tor Andersson