Commit graph

12580 commits

Author SHA1 Message Date
Simon McVittie
24996e6ee2 Fix build with newer binutils-dev installed
It seems the PTR typedef (or macro?) has been removed from newer versions
of libbfd.

Resolves: https://gitlab.freedesktop.org/cairo/cairo/-/issues/581
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-07-14 10:27:41 +01:00
Simon McVittie
f02f70d88e util: Don't expose _csi_stack_push in public ABI
This wasn't previously marked as private because it was initially
static inline, and only became extern later.

Fixes: 9ffbf63d "fix warning: inlining failed in call to '_csi_stack_push'"
Resolves: https://gitlab.freedesktop.org/cairo/cairo/-/issues/580
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-07-14 10:21:57 +01:00
Uli Schlachter
53faf76e57 Fix issue 579
cairo-trutype-subset.c would blindly trust a font saying that its name
list has thousands of entries. This commit changes find_name() to also
get the size of the input memory region and to do some bounds checking
on its memory accesses.

Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/579
Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-07-07 17:30:15 +02:00
Tim-Philipp Müller
2ff9afb737 Merge branch 'meson-list' into 'master'
Meson: use arrays to provide multiple arguments

See merge request cairo/cairo!339
2022-07-06 10:59:30 +00:00
Luca Bacci
c479479b69 Meson: use an array to provide multiple arguments 2022-07-06 12:05:00 +02:00
Adrian Johnson
ff08edfcc6 Merge branch 'color-option' into 'master'
Add color mode font option

See merge request cairo/cairo!333
2022-06-30 23:00:12 +00:00
Jeff Muizelaar
d64f9699eb Merge branch 'quartz-memcpy' into 'master'
quartz: Avoid reading beyond the end of image surfaces.

See merge request cairo/cairo!337
2022-06-30 16:03:16 +00:00
Jeff Muizelaar
cccc81ccba quartz: Avoid reading beyond the end of image surfaces.
The last row of data may have less than stride bytes so make sure we
only copy what we need.
2022-06-29 21:30:08 -04:00
Adrian Johnson
c68ff21e40 Merge branch 'mutex-fix' into 'master'
[mutex] Fix build with no mutexes

See merge request cairo/cairo!338
2022-06-29 22:38:49 +00:00
Behdad Esfahbod
b29f467330 [mutex] Fix build with no mutexes
NOOP1 is a statement, not an expression.
2022-06-29 11:16:04 -06:00
Adrian Johnson
cdb7c298c7 svg: Fix invalid output when image size is 0x0
cairo_surface_write_to_png_stream fails if width or height is 0
2022-06-26 09:54:15 +09:30
Adrian Johnson
99d59f00d6 Test color_mode option in ft-color-font test 2022-06-26 09:54:15 +09:30
Adrian Johnson
6bd549e8df Add color mode option 2022-06-26 09:54:15 +09:30
Uli Schlachter
f408ae9269 Merge branch 'palette-option' into 'master'
Add color palette font option

See merge request cairo/cairo!332
2022-06-17 12:58:42 +00:00
Adrian Johnson
f0ba2165a6 Add color palette option 2022-06-17 20:42:43 +09:30
Emmanuele Bassi
b5d2395a5f Merge branch 'link-to-the-ssp-static-library-when-fortify-source-is-enabled' into 'master'
Link to -lssp when enabling _FORTIFY_SOURCE

See merge request cairo/cairo!331
2022-06-10 14:55:03 +00:00
Luca Bacci
c3fc772948 Meson: link to -lssp when enabling _FORTIFY_SOURCE
This is required for MinGW GCC
2022-06-07 19:35:57 +02:00
Uli Schlachter
20a3767c47 Merge branch 'reenable-windows-ci' into 'master'
Revert "ci: Make Windows jobs manual"

See merge request cairo/cairo!326
2022-05-29 05:30:16 +00:00
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
ccb306b8dd Merge branch 'scaled-font-deadlock' into 'master'
Fix deadlock in cairo-scaled-font.c

See merge request cairo/cairo!329
2022-05-28 23:13:33 +00:00
Adrian Johnson
451dcd3143 Merge branch 'clamp-coordinates' into 'master'
Clamp path coordinates

Closes poppler/poppler#1250

See merge request cairo/cairo!325
2022-05-28 23:13:23 +00:00
Adrian Johnson
9fbf8f4859 Merge branch 'try-ports' into 'master'
view-test-results.py: try up to 10 ports

See merge request cairo/cairo!330
2022-05-28 23:13:17 +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
8f20ade808 autotools CI: build it faster 2022-05-28 17:37:04 +09:30
Adrian Johnson
1aa53f2ed4 big-trap test works 2022-05-28 16:56:50 +09:30
Adrian Johnson
616c300cd3 view-test-results.py: try up to 10 ports 2022-05-28 16:16:06 +09:30
Adrian Johnson
e7da8451f8 Update long-lines test 2022-05-28 16:14:31 +09:30
Adrian Johnson
47a21c6e30 Clamp path coordinates
Fixes https://gitlab.freedesktop.org/poppler/poppler/-/issues/1250
2022-05-28 16:03:50 +09:30
Adrian Johnson
f823f46267 Remove unused code 2022-05-28 08:45:26 +09:30
Adrian Johnson
76e0df5665 Fix deadlock in cairo-scaled-font.c
A user font glyph containing a font can cause deadlock in
_cairo_scaled_glyph_fini due to the destroy recording surface while
holding _cairo_scaled_glyph_page_cache_mutex. When the font in the
recording surface is removed from the page cache it will attempt to
also acquire the _cairo_scaled_glyph_page_cache_mutex resulting in
deadlock.

Instead of destroying the recording surface in
_cairo_scaled_glyph_page_cache_mutex, move it to an array in the
scaled font and destroy it after the
_cairo_scaled_glyph_page_cache_mutex is released.

Fixes the font in user font case in #440
2022-05-28 07:20:52 +09:30
Adrian Johnson
a8c1858cf2 Fix deadlock in cairo-scaled-font.c
When cairo_scaled_glyph_page_cache needs to remove entries,
cairo-cache calls _cairo_hash_table_random_entry() with the predicate
_cairo_scaled_glyph_page_can_remove(). This function checks that the
glyph_page scaled_font is not locked by testing
scaled_font->cache_frozen. The scaled font is locked in the
cache-cache destroy entry callback: _cairo_scaled_glyph_page_pluck().

There is a race condition here between testing
scaled_font->cache_frozen and locking the font. Fix this by adding a
new CAIRO_MUTEX_TRY_LOCK mutex operation, and using it to test and
lock the scaled font in _cairo_scaled_glyph_page_can_remove().

Fixes the multithreaded case in #440
2022-05-28 06:34:55 +09:30
Uli Schlachter
5dafd74116 Merge branch 'srcdir' into 'master'
Make it easier for cairo-test-suite to find the source dir

See merge request cairo/cairo!328
2022-05-20 13:07:41 +00:00
Behdad Esfahbod
b41cfe3fe0 [unicode] Non-characters are allowed in Unicode strings
https://www.unicode.org/faq/private_use.html#nonchar_codes

Fixes https://github.com/harfbuzz/harfbuzz/issues/3590
2022-05-18 17:35:38 -06:00
Adrian Johnson
29acc55849 Make it easier for cairo-test-suite to find the source dir 2022-05-19 06:44:58 +09:30
Adrian Johnson
e562ff757b Merge branch 'view-test-results' into 'master'
Python script to view test results

See merge request cairo/cairo!327
2022-05-17 21:17:36 +00:00
Adrian Johnson
6fec25a51f python script to view tests results
testtables.js no longer works in modern browsers as local file access
has been disabled. This script runs a python http server that serves
the contents of the current directory then opens the test results in
the webbrowser
2022-05-17 16:49:02 +09:30
Uli Schlachter
02eac251b0 Revert "ci: Make Windows jobs manual"
This reverts commit 9cfa510464.

The vs2017 amd64 and x86 jobs where marked as manual in  MR !285 with
the following reasoning:

    The CI runners for Windows are currently timing out on the fd.o
    infrastructure. The issue is being worked on, but we should avoid
    blocking our entire CI pipeline until it's fixed, as it sounds it is
    going to take a while.

It is time to re-enable these jobs.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2022-05-15 08:42:47 +02:00
Uli Schlachter
a0dfb2c073 Merge branch 'master' into 'master'
Add exec_prefix to cairo-script-interpreter.pc.in

See merge request cairo/cairo!324
2022-05-15 06:22:27 +00:00
Pierre Labastie
c087722141 Update util/cairo-script/cairo-script-interpreter.pc.in 2022-05-14 16:56:17 +00:00
Adrian Johnson
e32b2c34f1 Merge branch 'mingw-ci' into 'master'
Add mingw-32 and mingw-64 CI builds

See merge request cairo/cairo!321
2022-05-09 21:31:16 +00:00
Adrian Johnson
4823aa606b Merge branch 'warnings' into 'master'
Add -Werror for meson CI build

See merge request cairo/cairo!320
2022-05-09 21:30:35 +00:00
Emmanuele Bassi
6e3cacc90f Merge branch 'ft-default-lcd-filter' into 'master'
Set default LCD filter to FreeType's default

See merge request cairo/cairo!1
2022-05-09 21:18:04 +00:00
Nikolaus Waxweiler
b50b168a2e Set default LCD filter to FreeType's default 2022-05-09 21:16:28 +01:00
Uli Schlachter
a0e7e472c8 Merge branch 'dwrite-svg-fix' into 'master'
dwrite: Fix incorrect rendering of some SVG fonts

See merge request cairo/cairo!322
2022-05-08 18:03:25 +00:00
Adrian Johnson
7c037e5254 dwrite: Fix incorrect rendering of some SVG fonts
SVG fonts are returning DWRITE_GLYPH_IMAGE_FORMATS_NONE as well
as DWRITE_GLYPH_IMAGE_FORMATS_SVG in GetCurrentRun() resulting in the
outline glyph and color glyph both rendered to the same glyph image.
2022-05-08 20:28:41 +09:30
Adrian Johnson
e485bb1e26 Add mingw-32 and mingw-64 CI builds 2022-05-07 20:16:39 +09:30
Adrian Johnson
0f770dbce2 Add -Werror for meson CI build 2022-05-07 17:45:02 +09:30
Adrian Johnson
0ea231fae5 Fix GL warnings 2022-05-07 17:45:02 +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