Age | Commit message (Collapse) | Author |
|
|
|
|
|
Octal escapes in strings that are followed by a digit must use three
digits, with leading zeros if needed, so that they can be unambiguously
parsed.
|
|
|
|
Also ignore path components with no current point set and print
a warning rather than doing an implicit moveto(0,0).
|
|
|
|
When playing back from a list, previously flags would just be 0 or
non-zero. This makes no real difference, but looks odd when traced.
|
|
unsigned char * is not the same as char *.
|
|
Detect the d0 or d1 operators by writing a bit to the new device
flags word. This can then be checked by the Type3 code to create
the appropriate backing pixmap.
In order to know what the appropriate backing pixmap is, we pass
an additional colorspace into the glyph rendering code.
|
|
The problem is due to abutting images showing gaps between them.
These gaps are due to a combination of rounding errors, and anti-aliasing
effects on the edge of images.
The solution is to selectively 'grid fit' images.
If an image is part of a type 3 font, we do NOT want to grid fit it, as
this is where the sub pixel positioning makes a huge difference.
If an image is displayed with alpha, then we don't want to grid fit it
(as grid fitting will tend to make the edges of images overlap by 1
pixel, and will hence produce nasty effects).
Otherwise, we will grid fit; Grid fit in this sense is where we expand
an image to completely fill the pixel grid that it touches (i.e. the
extents for the image are expanded to pixel boundaries; no half full
pixels are left around the edges).
The only real change of note here is in how we detect that we are in a
type 3 charproc; we add a new draw device creation function that we call
in the type3 charproc case that sets a flag that the drawing functions
can check.
|
|
Firstly, this takes on some of Zenikos patch to correct the clip
stack handling that was broken by the fix to bug 692287 (in commit
2c3bbbf). This bug should now be solved.
We add a new 'shape' field to the draw device structure (and clip
stack). When we are inside non-isolated groups, this is set to be
a pixmap where we accumulate the 'shape' of the objects drawn.
When we come to blend back, if we are blending a non-isolated group
back, we have to use a different blending function that takes account
of the shape.
Various internal groups (the page group, and groups used to force
blending) are set to be isolated to avoid carrying shape planes
around when this is not required.
All our rendering code now has to know how to maintain the shape
plane as well as doing the basic rendering.
|
|
First, we add clipping rects to clipping functions. Various functions
(the ones that handle clipping) are now additionally passed a rectangle
that represents an additional bound for this clip in device space
(i.e. it has already been mapped through the current ctm).
Next, when constructing the displaylist, keep track of the bounding box
for the contents of each clip.
While writing the list, on every node we add, we add the bbox for that
node to the enclosing clips content bbox (if there is an enclosing clip).
When we pop a clip, write back to the corresponding push to update
the bbox.
This means if we get large clip regions, with only small areas used within
them, we will only do the slow blending for those small areas.
Finally, we fix a calculation in fz_bound_path which was incorrectly
accounting for mitrelimits. This was showing up in testing on page 630
of the PDF reference v1.7.
|
|
Bring the MuPDF android build up to date with the latest source changes.
Many thanks to Dominic Battre for his helpful report in bug 692222.
|
|
Bug 692245 gives a file that produces a runtime assert in mupdf due to an
extremely large ctm offset (unrepresentable in a float). We fix our code
here so that such floats are always read as 1.0.
In this particular case, the exact value read doesn't seem to matter. We
match acrobat. We pick 1.0 rather than 0.0 as this is less likely to
provoke division by 0 errors later on.
|
|
FT_LOAD_TARGET_LIGHT implies the autohinter, which causes spectacular
failures on DynaLab fonts. The stripped down freetype we compile with
using the "thirdparty" package does not have the autohinter, which is
how this bug slipped through the regression testing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All image loading functions call the new fz_new_pixmap_with_limit
allocation function, which will return NULL if the total amount of
pixmap memory would exceed a set limit. Other vital pixmap allocations
which are not as easily recoverable (such as font rendering, and the
various buffers in the draw device) ignore the limit.
|
|
|
|
|
|
Also put the function on the same line for inline functions, so
they stick out and are easy to find with grep.
|
|
|
|
|
|
Also turn on font hinting when rendering non-aa text.
|
|
|
|
Update the text rendering code to use the raster renderer in freetype rather
than the smooth one. No change to the hinting methods used yet.
|
|
AA_BITS < 0 => Runtime configurable.
AA_BITS = 0 => No antialiasing
AA_BITS > 0 => At least that many bits of accuracy (to a max of 8).
If unspecified, default is 8, so old behaviour is maintained.
|
|
|
|
|
|
|
|
Add fz_bitmaps (1bpc versions of pixmaps, really).
Add fz_halftones (arrays of fz_pixmaps used as threshold arrays).
Add simple halftoning code.
Add pdfdraw usage of the above (ask for a .pbm and you get a halftoned image).
|
|
We used to convert through the XYZ colorspace. For various reasons we
changed to convert through RGB instead, but the function names didn't
follow suit.
|
|
|
|
|
|
|
|
|
|
They test for NULL and make the code look nicer.
|
|
Use tabs for indentation and no extra spaces to align stuff.
|
|
The run-together words are dead! Long live the underscores!
The postscript inspired naming convention of using all run-together
words has served us well, but it is now time for more readable code.
In this commit I have also added the sed script, rename.sed, that I used
to convert the source. Use it on your patches and application code.
|
|
|
|
|
|
|
|
|