| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #508
|
|
|
|
|
|
|
| |
Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint`
Follow up of 12cb59be7da
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
|
|
|
|
|
|
|
|
|
|
| |
_cairo_malloc(0) always returns NULL, but has not been used
consistently. This patch replaces many calls to malloc() with
_cairo_malloc().
Fixes: fdo# 101547
CVE: CVE-2017-9814 Heap buffer overflow at cairo-truetype-subset.c:1299
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found using `codespell -q 3 -I cairo-whitelist.txt`
whereby whitelist contained:
```
amin
iff
lod
writen
```
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
|
|
|
|
|
| |
patch by jmmorlan@sonic.net
https://bugs.freedesktop.org/show_bug.cgi?id=100029
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an unbounded recording surface is used multiple times with
different extents for each operation we need the XObject containing
the recording surface to have the same origin for each operation. This
is not possible when the recording surface is converted to PDF
coordinates because each operation has different extents resulting in
a different origin when the Y-axis is flipped (since the flip matrix
depends on the recording surface height which for unbounded surfaces
depends on the extents of the operation that paints the recording
surface).
Switching to cairo coordinates by emitting a Y-axis flip matrix as the
first object of each page allows the recording surface to be emitted
in cairo coordinates. This results in the same origin for all
operations using the recording surface XObject.
|
|
|
|
| |
bug 86461
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
since the PS Document Structing Conventions impose a 255 character
line limit. PDF does not require wrapping.
pdf-operators is designed to emit the same output for PS and PDF.
Unfortunately some PDF interpreters don't like strings split with
'\\\n' and some PS interpreters don't like strings split with ')('.
So we are forced to make pdf-operators handling string wrapping
differently for PDF and PS.
Bug 85662
|
|
|
|
|
| |
The PDF interpreter in my printer does not handle this correctly.
So instead we add the string delimiters '(' and ')' to each line.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Sometimes as a result of rounding errors in matrix transformations the
matrices in ps/pdf output look like:
0.000000000000000061 1 1 -0.000000000000000061 0 842 cm
This patch rounds to zero matrix elements that are very small compared to
other elements in the same matrix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having spent the last dev cycle looking at how we could specialize the
compositors for various backends, we once again look for the
commonalities in order to reduce the duplication. In part this is
motivated by the idea that spans is a good interface for both the
existent GL backend and pixman, and so they deserve a dedicated
compositor. xcb/xlib target an identical rendering system and so they
should be using the same compositor, and it should be possible to run
that same compositor locally against pixman to generate reference tests.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
P.S. This brings massive upheaval (read breakage) I've tried delaying in
order to fix as many things as possible but now this one patch does far,
far, far too much. Apologies in advance for breaking your favourite
backend, but trust me in that the end result will be much better. :)
|
|
|
|
|
|
|
| |
Step 1, fix the failings sighted recently by tracking clip-boxes as an
explicit property of the clipping and of composition.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
| |
Path are always interpreted in forward direction, so the ability of
interpreting in the opposite direction (which is very unlikely to be
useful at all) can be removed.
|
|
|
|
|
|
|
|
|
|
|
| |
Make the default case be an assert to catch a silly programming error
and silence the compiler:
cairo-pdf-operators.c: In function ‘_word_wrap_stream_write’:
cairo-pdf-operators.c:300: warning: ‘count’ may be used uninitialized in
this function
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
|
|
|
|
| |
The use of ActualText in a marked content sequence is a PDF 1.5
feature.
A 'use_actual_text' flag linked to the PDF version has already been
implemented in pdf-operators but for some reason this flag had not
been used to control the use of ActualText.
|
|
|
|
| |
to fix some bugs
|
| |
|
|
|
|
|
| |
This optimizes the output to increase the maximum amount of text that
is emitted with a single Tj operator.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
I updated the Free Software Foundation address using the following script.
for i in $(git grep Temple | cut -d: -f1 )
do
sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
|
| |
|
| |
|
|
|
|
|
|
| |
As a simple step to ensure that we do not inadvertently modify (or at least
generate compiler warns if we try) user data, mark the incoming style
and matrices as constant.
|
|
|
|
|
| |
A pending commit will want to include some utility code from cairo and
so we need to extricate the error handling from the PLT symbol hiding.
|
|
|
|
| |
The glibc versions are slow in utf8 locales.
|
|
|
|
|
|
|
|
|
| |
As a fun itch to scratch, I've been fixing incorrect uses of the
contraction "it's" in comments within the mozilla source tree (tracked
in https://bugzilla.mozilla.org/show_bug.cgi?id=458167 ), and I ran
across 6 instances of this typo in mozilla's snapshot of cairo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
|
|
|
| |
Use const to document the read-only nature of the arguments passed to the
callbacks.
|
|
|
|
|
| |
Use the gcc likelihood annotation to indicate that allocation failures are
extremely unlikely.
|
|
|
|
|
| |
The error paths should be hit very rarely during normal operation, so mark
them as being unlikely so gcc may emit better code.
|
|
|
|
|
| |
JPEG 2000 image embedding and ActualText marked content are
PDF 1.5 features.
|
|
|
|
|
|
|
|
|
|
| |
A new meta-surface backend for serialising drawing operations to a
CairoScript file. The principal use (as currently envisaged) is to provide
a round-trip testing mechanism for CairoScript - i.e. we can generate
script files for every test in the suite and check that we can replay them
with perfect fidelity. (Obviously this does not provide complete coverage
of CairoScript's syntax, but should give reasonable coverage over the
operators.)
|
|
|
|
| |
Check and return a few forgotten error codes from static functions.
|
|
|
|
|
|
|
| |
As PS has different semantics regarding a zero-length dash, we need to
adjust the dash array before emitting. However, we need to modify a copy
of the dash array since the same array may be used by the meta-surface
when replaying to an image fallback.
|
|
|
|
|
|
|
|
|
|
| |
Chris rightfully complained that having a boolean function argument is
new in cairo_show_text_glyphs, and indeed avoiding them has been one
of the API design criteria for cairo. Trying to come up with alternatives,
Owen suggested using a flag type which nicely solves the problem AND
future-proofs such a complex API.
Please welcome _flags_t APIs to cairo.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quick summary of changes:
- Move list of cairo source files out of src/Makefile.am and into
src/Sources.mk,
- Generate files src/Config.mk and src/Config.mk.win32 that choose
the right set of source files and headers based on configured
backends and features. This drastically simplifies building
using other build systems. The src/Makefile.win32 file needs
to be updated to reflect these changes.
- Add README files to various directories,
- Add toplevel HACKING file.
|
|
|
|
| |
Check for an error status after end_text().
|
|
|
|
|
| |
Do not overwrite the error status if returned by either of the
emit_glyph_string*() routines.
|
|
|
|
| |
Check the status return from begin_actualtext().
|
| |
|
| |
|
|
|
|
| |
Propagate the error status from _cairo_pdf_operators_emit_glyph().
|
|
|
|
| |
So we don't need to emit line style parameters that are already set.
|
| |
|
|
|
|
|
|
| |
As the translation is in text space, the full precision of a double
for numbers close to zero is not required. Limit the precision to the
same as for numbers > 1.
|
|
|
|
|
|
| |
Previously this was not correctly checking the position of the first
glyph and falling back to using TJ if the glyph was not at the the
standard glyph advance.
|
|
|
|
|
| |
Previously this was not correctly positioning the first glyph in a TJ
string if the glyph was not at the the standard glyph advance.
|
| |
|