Commit graph

196 commits

Author SHA1 Message Date
Adrian Johnson
3a60f6e138 Merge branch 'ft-svg-fonts' into 'master'
Support SVG fonts in FT backend

See merge request cairo/cairo!319
2022-12-31 09:27:57 +00:00
Uli Schlachter
4913f07950 Merge branch 'round-join' into 'master'
Remove `round-join-bug-520*` CI exceptions for Quartz backend

See merge request cairo/cairo!377
2022-12-29 12:37:01 +00:00
Christian Rohlfs
aa8d16ab83 Removed round-join-bug-520* CI exceptions for Quartz backend
Removed lines from `.gitlab-ci/ignore-quartz*`;
Added `round-join-bug-520-bevel.quartz.ref.png` file.
2022-12-28 17:50:27 +05:00
Uli Schlachter
0e56ea9d5c Merge branch 'round-join' into 'master'
Fix for round joins

See merge request cairo/cairo!372
2022-12-28 09:58:35 +00:00
Adrian Johnson
7fa02c81f1 Merge branch 'bug-535' into 'master'
Fix bug #535 in cairo-script

Closes #535

See merge request cairo/cairo!276
2022-12-28 05:05:07 +00:00
Adrian Johnson
8233c6362b ft-svg-render test 2022-12-28 13:22:00 +10:30
Adrian Johnson
252ff60f1e SVG font test using cairo logo 2022-12-28 13:22:00 +10:30
Adrian Johnson
1bd5751324 FT SVG color font test 2022-12-28 13:22:00 +10:30
Christian Rohlfs
805897b1f7 test: Add new round-join-bug-520 tests
https://gitlab.freedesktop.org/cairo/cairo/-/issues/520
2022-12-28 06:52:29 +05:00
John Ralls
04cf47b57a Change expected fails and reference image so that Quartz CI passes. 2022-11-17 16:20:14 -08:00
Adrian Johnson
99d59f00d6 Test color_mode option in ft-color-font test 2022-06-26 09:54:15 +09:30
Uli Schlachter
21d7198bef Merge branch 'fix-rgb24-tests' into 'master'
Fix clip-unbounded and alpha-similar in CI

See merge request cairo/cairo!301
2022-05-29 05:29:57 +00:00
Uli Schlachter
9136454629 Merge branch 'fix-clip-unbounded' into 'master'
Add missing ref image for clip-unbounded

See merge request cairo/cairo!261
2022-05-29 05:28:32 +00:00
Adrian Johnson
9fadf0a116 Update huge-linear and huge-radial pdf ref images
pdf output is correct but the poppler rendering is incorrect
2022-05-28 18:25:08 +09:30
Adrian Johnson
1aa53f2ed4 big-trap test works 2022-05-28 16:56:50 +09:30
Adrian Johnson
e7da8451f8 Update long-lines test 2022-05-28 16:14:31 +09:30
Adrian Johnson
455a4cca54 Merge branch 'quartz-core-text' into 'master'
quartz: support rendering colored bitmap fonts

See merge request cairo/cairo!289
2022-04-27 00:04:43 +00:00
John Ralls
cfb3835f57 [quartz] Add wiggle test for quartz emoji. 2022-04-26 15:52:04 -07:00
John Ralls
2784159d0e [quartz] Adjust x_extents metric.
CoreText uses different advances depending on the font size, with very
small point sizes sometimes getting advances that are smaller than the
glyph's width. This is manifested in the Apple Color Emoji font with the
Emoji glyphs having a width of 1.25 and an advance width of 1.0. That
results in overlapping emoji when they're in a string.

The small spacing difference also affects 3 tests so updated reference
images are included in this commit.

 # Please enter the commit message for your changes. Lines starting
2022-04-25 11:30:10 -07:00
Adrian Johnson
4815949d2f Fix the scaled_glyph_init color glyph logic
and split _cairo_user_scaled_glyph_init() into multiple functions.

Update user-font test to test changing foreground text color.
2022-04-25 17:08:07 +09:30
John Ralls
c6dc5df612 [quartz] Convert font handling from CGFont to CTFont. 2022-04-24 13:08:48 -07:00
Uli Schlachter
63973958bc Add an rgb24 ref image for alpha similar
This commit copies the current alpha-similar.image.rgb24.out.png to
alpha-similar.rgb24.ref.png to make the test pass.

This failure goes back to commits 6647511 / 049060 which changed the
image comparison in the test suite. Previously, transparent "nothing"
and black compared equal, but said commits fixed that. Thus, having a
special reference image with black instead of transparency is the right
fix.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-03-13 16:14:48 +01:00
Adrian Johnson
5018120af0 Update ref images 2022-03-05 11:51:55 +10:30
John Ralls
2e0075e265 [quartz] Don't use CGContextDrawTiledImage for tiled patterns.
CGContextDrawTiledImage turned up as a significant time-user while
profiling a benchmark created to evaluate
https://gitlab.gnome.org/GNOME/gtk/-/issues/3714. Without this commit
the benchmark is able to perform a mean frame rate of 2.19 frames per
second with a standard deviation of 0.09; with the commit the mean frame
rate is 2.37 fps, s.d. 0.30, both over 15 10-second samples. Student's
t-test reports a 9.8% likelyhood that the two represent the same
distribution.
2022-02-24 17:00:07 -08:00
Uli Schlachter
01c93c7f36 Fix bug #535 in cairo-script
cairo-script has a special case for drawing a set of rectangles. The
rectangle detection can trip over a "degenerate rectangle": Just a
horizontal line. It detects the line as the beginning of a rectangle and
then claims CAIRO_STATUS_INVALID_PATH_DATA when the other sides of the
rectangle are missing.

This commit simply changes the return value to
CAIRO_INT_STATUS_UNSUPPORTED to trigger a fallback to the generate case.

Test case is a straight-forward adaption from the original bug report.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/535
2022-02-16 17:53:49 +01:00
Behdad Esfahbod
a62eea4aec [user-font] Implement subpixel-positioning
See:

https://github.com/harfbuzz/harfbuzz/pull/3411#issuecomment-1033118545
https://github.com/harfbuzz/harfbuzz/pull/3411#issuecomment-1033125311
https://github.com/harfbuzz/harfbuzz/pull/3411#issuecomment-1037765840

Basically the code in cairo-image-compositor.c:composite_glyphs()
is flooring glyph positions and putting some phase in the glyph-id.
This was being lost in the user-font backend. Fetch that and put it
in the recording-surface's device-transform translation, to be applied.
2022-02-13 14:34:24 -06:00
Uli Schlachter
d6180c2457 Add missing ref image for clip-unbounded
This commit copies clip-unbounded.base.rgb24.ref.png to
clip-unbounded.rgb24.ref.png. This makes the test pass for rgb24
targets.

This failure goes back to commits 6647511 / 049060 which changed the
image comparison in the test suite. Previously, transparent "nothing"
and black compared equal, but said commits fixed that. Thus, having a
special reference image with black instead of transparency is the right
fix.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-10-19 18:41:47 +02:00
Adrian Johnson
8ea4ae5413 Allow user fonts to use the foreground color 2021-09-18 07:05:35 +09:30
Tim-Philipp Müller
b1135db014 test: update quartz ref image to fix macos pthread test failure
The proper pthread check activated some tests that weren't active
before, which resulted in a test failure apparently caused by
inexact test rendering.

Update the quartz reference image accordingly.
2021-08-28 12:57:17 +01:00
Adrian Johnson
e73f236da6 Update user-font-mask ref images 2021-08-28 09:19:09 +09:30
Adrian Johnson
c773060195 Merge branch 'HairlineStroke' into 'master'
Added hairline support to cairo

See merge request cairo/cairo!21
2021-08-15 06:58:54 +00:00
Rick Yorgason
ecec0419f8 Added hairline support to cairo 2021-08-15 06:58:54 +00:00
Adrian Johnson
62cc53f9b8 Add color user-font support
Adds new API cairo_user_font_face_set_render_color_glyph_func()
to set a color glyph renderer.
2021-08-14 06:06:19 +00:00
Adrian Johnson
7c6f2d4f24 Add ft-color-font test 2021-07-31 08:56:59 +09:30
Adrian Johnson
6fbfc9d927 pdf: use floating point widths when emitting fonts 2021-07-27 20:13:23 +00:00
afdw
9ab52c9131 Merge branch 'master' into 'svg-backend-work'
# Conflicts:
#   .gitlab-ci.yml
#   test/Makefile.sources
#   test/meson.build
2021-05-29 18:32:53 +02:00
Anton Danilkin
c2bf6e8ae4 Fix remaining tests 2021-05-05 00:51:01 +02:00
Anton Danilkin
42128f1742 Fix reference images 2021-05-03 22:13:16 +02:00
Anton Danilkin
5b678d8185 Fix applying shifted operators 2021-05-03 16:33:05 +02:00
Uli Schlachter
4f61b765c9 Merge branch 'record-png-offset' into 'master'
Add a test case for commit d07fb41056

See merge request cairo/cairo!122
2021-05-02 14:55:48 +00:00
Anton Danilkin
bd487e64fc Add support for CAIRO_CONTENT_COLOR 2021-05-01 23:14:24 +02:00
Anton Danilkin
917f366ad1 Add a test for #431 2021-04-11 23:59:47 +02:00
Anton Danilkin
ceae137ba6 Finish implementing correct paints in transformed recording patterns 2021-04-11 23:59:47 +02:00
Anton Danilkin
71eef9c8bc Implement the rest of the operators 2021-04-11 23:59:47 +02:00
Anton Danilkin
170f8812fb Add a test for #361 2021-04-11 23:59:47 +02:00
Uli Schlachter
753ea90ac1 Add a test case for commit d07fb41056
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-04-01 17:02:48 +02:00
Uli Schlachter
ee43299276 Make the test case for bug 448 pass
Someone apparently forgot to actually add the reference image. And also
forgot to add the test to meson. Sigh.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-02-06 16:40:48 +01:00
Heiko Lewin
03a820b173 Fix mask usage in image-compositor 2020-12-15 16:48:19 +01:00
Massimo Valentini
82a2477a4a add a test to exercise tor22 spans allocation code path 2019-05-10 15:02:54 +00:00
Bryce Harrington
ad7ac7dbca Normalize one more test image with minor gradient differences
For me, with this fix, the base image test cases now pass 100%, when
running:

  make test TARGETS=image FORMAT=rgba

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-14 11:34:22 -07:00