summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/glyph-cache.h
AgeCommit message (Collapse)Author
2018-08-22Remove the old 'nested depth' tracking.Tor Andersson
This was used to prevent infinite cycles in the Type3 font CharProcs, but the previous commits forbids all cycles in order to prevent memory leaks due to cyclic reference counts.
2018-07-05Pass matrices by value: device and document interface.Tor Andersson
2017-10-24Look for changes to Default colorspaces in XObjects.Robin Watts
2017-06-22Move rasterizer/anti-alias choices into the draw device.Robin Watts
We still use the fz_context versions as the default, but these can be overridden with draw device options.
2017-01-17Fix 697476: Rename header files.Tor Andersson
Xcode has an idiotic default configuration where it gets confused by include search paths and file names in projects, so that it will load our "mupdf/fitz/math.h" instead of the system <math.h>. Work around this by renaming header files that have the same base name as a system header (even though they live in a subdirectory, and should never be available directly on the compiler's include path).
2016-11-14More API tweaks.Robin Watts
Move internal functions from public to private headers.
2016-05-24fz_pixmap revamp: add stride and make alpha optionalRobin Watts
fz_pixmaps now have an explicit stride value. By default no change from before, but code all copes with extra gaps at the end of the line. The alpha data in fz_pixmaps is no longer compulsory. mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw). Update halftone code to not expect alpha plane. Update PNG writing to cope with alpha less input. Also hide repeated params within the png output context. ARM code needs updating.
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-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.
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.
2013-09-02Expose subpixel glyph adjustment calculations.Robin Watts
Pull subpixel glyph adjustment calculations into fz_subpixel_adjust. This reduces the repetition of code, and will be helpful for the OpenGL device.
2013-09-02Add glyph rendering routines that return fz_pixmaps rather than fz_glyphs.Robin Watts
These do no caching, and are intended to be useful for the opengl device.
2013-09-02Be smarter when quantising sub pixel positions for glyphs.Robin Watts
For large glyphs, sub pixel positioning is supremely unimportant. Even for smaller glyphs, we don't need 5*5 possible sub pixel positions. Base the degree of sub pixel quantisation on the size of the glyphs. This should result in better cache use. We push all the glyph sub positioning logic into fz_render_glyph (and fz_render_stroked_glyph). This simplifies the calling code. We also tweak fz_render_glyph so that it updates the transform it is called with to reflect the sub pixel positioning. This solves various problems: Firstly, we can round positions both up and down to achieve a smaller net displacement (e.g. (0.99, 0.99) can go to (1,1) rather than (0.75, 0.75) if we have a subpixel position resolution of 1/4 pixels). Secondly, glyphs that are drawn from outlines will have exactly the same subpixel changes applied. This is unlikely to be noticable, but it does mean that baselines should avoid having any shifts in them. Finally, it enables us to avoid lots of unnecessary copying of matrices, hopefully reducing overhead.
2013-08-30Use RLE coding scheme for glyph bitmaps.Robin Watts
Rather than generating fz_pixmaps for glyphs, we generate fz_glyphs. fz_glyphs can either contain a pixmap, or an RLEd representation (if it's a mask, and it's smaller). Should take less memory in the cache, and should be faster to plot.
2013-08-28Dump glyph cache size as part of mudraw -MRobin Watts
2013-06-18Add explicit #include for header file interdependencies.Tor Andersson
2013-06-18Split fitz.h into subheaders.Tor Andersson