Commit graph

2310 commits

Author SHA1 Message Date
Behdad Esfahbod
a7a0085713 Merge branch 'font-variations' 2018-01-03 12:35:12 +00:00
Uli Schlachter
6b0593827b Add test for error handling with broken PNG streams
Would-have-caught: https://bugs.freedesktop.org/show_bug.cgi?id=104325
Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-12-24 13:23:13 +01:00
Matthias Clasen
46034b0547 Make the font-variations test pass
Not sure what I was thinking - the test is checking the width
axis, but the font we're using has only weight and contrast
as axes...
2017-12-19 15:18:57 -05:00
Behdad Esfahbod
34047d11db [variations] Fix test
This does not exercise merging of variations from font-options and from
pattern.  Before this commit the code was more towards doing that.
2017-12-19 15:17:01 -05:00
Behdad Esfahbod
6accf16093 [variations] Towards fixing test 2017-12-19 15:17:01 -05:00
Matthias Clasen
38b6e23609 Add a test for font variations
This test checks that passing font variation settings via
font options has the desired effect. It checks this by reading
the effective axis values out of the FT_Face after creating
a font with these options.
2017-12-19 15:17:01 -05:00
Adrian Johnson
164be89660 test: update some stale ref images 2017-11-10 20:10:01 +10:30
Adrian Johnson
71746c37d4 test: use CAIRO_MIME_TYPE_UNIQUE_ID with record-text-transform
The PS output from this test is > 100MB due to the duplicated images.
Using CAIRO_MIME_TYPE_UNIQUE_ID reduces the PS output to 650k, runs
considerably faster, and now produces correct output.
2017-11-09 22:02:05 +10:30
Adrian Johnson
7d3ba77b6c ps: use Reusable streams for forms in Level 3
to avoid emitting image data as strings
2017-11-09 22:01:40 +10:30
Adrian Johnson
b1c7a087b5 ps: use forms for surfaces with UNIQUE_ID mime type
to ensure the surfaces are emitted only once.

fixes mime-unique-id PS output
2017-11-09 22:01:40 +10:30
Adrian Johnson
d5cb45013b pdf: fix mime-unique-id jpeg attached to recording test
- Restructure the emit_surface code so that mime types are checked first.

- Add a test parameter to emit_surface to test if the surface will be emitted
  as an image or recording instead checking the surface type as the attached
  mime may override this.

- Mark surface as not clear when mime is attached to avoid optimizing away
  "clear" surfaces that have mime attached.

- Include entire surface in analysis if mime attached (also fixes bug with
  calculating the extents CONTENT_COLOR surfaces)
2017-11-09 22:01:40 +10:30
Adrian Johnson
5e4707a10d Add mime-unique-id test
to check that PS/PDF embeds images with CAIRO_MIME_TYPE_UNIQUE_ID only
once.
2017-11-09 20:52:36 +10:30
Adrian Johnson
e1a02b180d Add CCITT_FAX mime type for PDF and PS surfaces
This completes the full set of PDF/PS image filters allowing image
data to be passed though without decompressing then recompresssing in
a less efficient format.

The difficulty with CCITT_FAX is it needs some decoding parameters
that are not stored inside the image data. This is achieved by using
an additional mime type CCITT_FAX_PARAMS that contains the params in
key=value format.
2017-10-22 08:42:36 +10:30
Adrian Johnson
27990e3910 fix unused function warnings 2017-10-16 20:18:49 +10:30
Adrian Johnson
1d58e0f818 svg2png: remove unused headers 2017-10-15 19:42:08 +10:30
Adrian Johnson
609261bcbc pdf: use explicit dest instead of named dest when 'internal' attribute is set 2017-08-29 21:43:07 +09:30
Adrian Johnson
12b875aef3 pdf: use link attributes instead of dest name for cairo_pdf_surface_add_outline
In PDF outline targets are specified the same way as link targets so
there is no need to restrict the target to dest names.
2017-08-26 16:32:48 +09:30
Adrian Johnson
bb4ab5a8be tests: fix bug in pdf-tagged-text that was introduced in 4790a36 2017-08-19 10:52:18 +09:30
Andrea Canciani
a3cc46d2cc quartz-font: Fix text-glyph-range
The index 0 is a legitimate index used for character codes that do not
correspond to any glyph in the font.  Instead, the API reserves 0xFFFF
(kCGFontIndexInvalid) as the invalid index and defines 0xFFFE
(kCGFontIndexMax = kCGGlyphMax) as the maximum legal index.

Fixes text-glyph-range.
2017-04-25 18:06:14 +02:00
Andrea Canciani
cb9f627378 test: Add a test for characters in the SMP
Unicode characters in the Supplementary Multilingual Plane are encoded
as surrogate pairs in UTF-16. This test tries to verify that backends
do not perform UCS4 to UTF-16 conversion by truncation.
2017-04-25 18:05:40 +02:00
Kouhei Sutou
dd4706d0a9 pdf: Fix wrong cairo_pdf_outline_flags_t item prefix 2017-01-05 08:33:07 +10:30
Adrian Johnson
4790a3663d strndup is not avuilable with MSVC 2016-10-07 07:38:37 +10:30
Adrian Johnson
55f8c6d9f4 fix compiler warnings 2016-10-04 12:00:30 +10:30
Adrian Johnson
23fd706bd1 add test for PDF document interchange features such as tagged text and links 2016-10-01 22:48:05 +09:30
darxus@chaosreigns.com
cbbd02f9c5 Add example to run specific tests by name to the test/README
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2016-08-31 20:29:57 -07:00
darxus@chaosreigns.com
66205ad48e Remove closed poppler bugs from test/README
These bugs have all been closed resolved / fixed for years.

Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-31 18:22:10 -07:00
Adrian Johnson
deb994488f test: refresh text-rotate ref images 2016-07-05 20:26:47 +09:30
Adrian Johnson
d92015e4f9 add test text-unhinted-metrics
Based on bug report in https://lists.cairographics.org/archives/cairo/2016-April/027334.html
2016-07-05 20:26:47 +09:30
Adrian Johnson
113ba5f3fa Update ref images
ref images were creating using Debian Jessie 64-bit and latest poppler.
2016-06-05 20:43:36 +09:30
Adrian Johnson
14fa88fd02 pdf: fix record-replay-extend test failures 2016-06-05 20:43:36 +09:30
Adrian Johnson
e7b1cb0c53 image: fix record-replay-extend test failures 2016-06-05 20:43:36 +09:30
Adrian Johnson
8e4d4de2a3 test: replay record surface with negative extents for each extend mode
image fails for repeat, reflect, and pad.
2016-06-05 20:43:36 +09:30
Adrian Johnson
a736fd8699 Fix PDF record-neg-extents test failure
Modify PDF surface to allow surface extents to have negative x, y.
When emitting recording surfaces, set the surface extents to the
recording extents.
2016-06-05 20:43:36 +09:30
Adrian Johnson
d2dc2e90a7 Fix test failures when recording surface extents has negative x,y
Fixes record-neg-bounded-extents (image only) and
recording-ink-extents.
2016-06-05 20:43:36 +09:30
Adrian Johnson
58df191946 Add recording-ink-extents test
bounded_fill fails returning extents origin of (0, 0) instead of (-150, -100)
2016-06-05 20:43:36 +09:30
Adrian Johnson
9fff6f0be3 test: add record-neg-extents
Test case for bug 89232 - painting a recording surface to a
pdf/ps surface omits objects on the recording surface with negative
coordinates even though the pattern matrix has transformed the objects
to within the page extents.

The image surface also fails when the recording surface is bounded.
2016-06-05 20:43:36 +09:30
Adrian Johnson
00a36e4652 svg2png: fix deprecated warning
rsvg_pixbuf_from_file() is deprecated, replaced by
rsvg_handle_new_from_file() + rsvg_handle_render_cairo().
2016-04-16 18:05:41 +09:30
Adrian Johnson
11667ec47c pdf2png: fix deprecated warning 2016-04-16 17:42:56 +09:30
Bryce Harrington
0986ae4dee test: Fix use after frees
Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=93152
2015-12-09 11:30:34 -08:00
Adrian Johnson
30eb1b0e97 Add test case for thin lines
Bug 77298
2015-10-17 18:39:19 +10:30
Adrian Johnson
6952e03262 ps: fix raster source patterns 2015-10-17 18:16:22 +10:30
Bryce Harrington
e40806ecdf test: Add script to display the difference between two result sets 2015-07-31 19:00:48 -07:00
Bryce Harrington
60c2f69535 test: Add script to summarize the test results from a run 2015-07-31 18:59:34 -07:00
Bryce Harrington
e0963f6c8e gitignore: Ignore .trs (test results) 2015-07-31 17:56:54 -07:00
Bryce Harrington
c04bd43083 test: Free the memory, not the pointer to the memory
In read_file(), we see:

    *data = malloc (*len);
    ...
    if (fread(*data, *len, 1, fp) != 1) {
      free(data);
      ...

The free call needs to be free(*data), to match the malloc call.

Matthias Clasen found this via Coverity and proposed the fix.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91381
2015-07-30 16:45:15 -07:00
Bryce Harrington
0dd5d84bae svg2png: Only call deprecated g_type_init() for old glib versions.
Quells the following warning:

pdf2png.c:52:5: warning: ‘g_type_init’ is deprecated (declared at
/usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations]
     g_type_init ();
     ^
svg2png.c:47:5: warning: ‘g_type_init’ is deprecated (declared at
/usr/include/glib-2.0/gobject/gtype.h:667) [-Wdeprecated-declarations]
     g_type_init ();
     ^

Patch authored by arpitj01@gmail.com

Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=81197
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-28 17:10:33 -07:00
Andrea Canciani
68e12cd37f test: Update quartz reference images 2015-07-27 12:45:59 +02:00
Andrea Canciani
e1353f3b85 test: Always use DejaVu Sans as default font
This makes the results of the test suite more stable across different
environments, because it does not rely anymore on
CAIRO_FONT_FAMILY_DEFAULT (which on Windows is "Arial", on Mac
"Helvetica").

This change should not affect Linux environments, assuming that the
default font is already set to "DejaVu Sans".
2015-07-27 12:45:59 +02:00
Arpit Jain
943ba26a20 test/bitmap-font: Fix use of pointer after freed pointer
The pointer 'filename' is already freed and still used as a function
argument.  This patch will free the pointer 'filename' only after it is
used.

Also, the patch ensures that it frees the pointer 'filename' before any
return of this function.

Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=91206
Signed-off-by: Arpit Jain <jain.arpit@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-07-06 15:14:23 -07:00
Andrea Canciani
89942c6af0 test: Correct bug number in clip-complex-bug61592
The filename of the C source file is correct, but the test name (both
as function name and as reference image name) has a typo in it.

Related to https://bugs.freedesktop.org/show_bug.cgi?id=61592
2015-04-16 11:28:50 +02:00