Commit graph

12910 commits

Author SHA1 Message Date
Adrian Johnson
8da24bf7fb Make _cairo_calloc() consistent with _cairo_malloc()
ie

  _cairo_calloc(size)
  _cairo_calloc_ab(a, size)
2024-06-21 08:53:01 +09:30
Adrian Johnson
0700bb78a2 Merge branch 'ft-no-fc' into 'master'
Fix FreeType build failure when Fontconfig is disabled

See merge request cairo/cairo!564
2024-06-11 21:39:10 +00:00
Adrian Johnson
f1b781e99d Build mingw-32 in CI with fontconfig disabled
This gives us one build in CI that has FreeType enabled and Fontconfig
disabled in order to ensure this combination builds.

Building the Fontconfig backend with Mingw is still checked in the
mingw-64 build.
2024-06-10 13:18:56 +09:30
Adrian Johnson
00ce12846a Fix cairo-ft-font.c build failure when fontconfig not available 2024-06-10 11:07:46 +09:30
Adrian Johnson
a308881018 Merge branch 'cloexec' into 'master'
Set CLOEXEC when opening files

Closes #213

See merge request cairo/cairo!563
2024-06-08 22:20:17 +00:00
Adrian Johnson
b0b5562b9e Set CLOEXEC when opening files
Based on the patch by Christian Persch in #213.

Closes #213
2024-06-08 06:40:55 +09:30
Adrian Johnson
1193515f5d Merge branch 'meson-fixes' into 'master'
A couple of meson fixes

See merge request cairo/cairo!561
2024-06-01 13:17:30 +00:00
Adrian Johnson
b00db10ae8 meson: Use cc.has_define instead of cc.get_define for variables that may be undefined
Fixes the message:

  Fetching value of define "DEBUG_SVG_RENDER" : (undefined)
2024-06-01 21:34:41 +09:30
Adrian Johnson
4f38b502e5 Fix meson deprecation warning
test/meson.build:663: WARNING: Project targets '>= 1.3.0' but uses feature deprecated since '0.64.0': copy arg in configure_file. Use fs.copyfile instead
2024-06-01 21:34:35 +09:30
Adrian Johnson
f0a651e1ac Merge branch 'c11-atomics' into 'master'
Add support for C11 atomics

See merge request cairo/cairo!479
2024-05-31 09:40:37 +00:00
Uli Schlachter
01a8ca0518 Merge branch 'master' into 'master'
Update to add sunos

See merge request cairo/cairo!526
2024-05-28 16:30:57 +00:00
Adrian Johnson
09779a7e58 Merge branch 'update-fontconfig-and-libpng' into 'master'
Update fontconfig and libpng versions

See merge request cairo/cairo!558
2024-05-26 23:09:52 +00:00
Uli Schlachter
9fcfdce216 Merge branch 'remove-unused-files' into 'master'
Remove two unused files

See merge request cairo/cairo!560
2024-05-26 19:41:16 +00:00
Adrian Johnson
a141cfdf51 Merge branch 'pdf-structure-test' into 'master'
Enable pdf-structure test

See merge request cairo/cairo!559
2024-05-26 11:53:14 +00:00
Adrian Johnson
87f7c60bf7 Add support for C11 atomics 2024-05-26 21:17:39 +09:30
Uli Schlachter
5d67d28ff0 Remove two unused files
There are two check-link.c files which were "tests" in the autotools
build and are unused ever since the autotools build was removed.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2024-05-26 07:14:57 +02:00
Adrian Johnson
b31ca9a3c3 Enable pdf-structure test
Fedora 40 contains a recent version of poppler that supports
extracting the pdf structure.

And add missing pdf-structure ref data.
2024-05-25 19:51:28 +09:30
Adrian Johnson
8d0650bb60 Use intptr_t for cairo_atomic_intptr_t
Since we now require C11 we can use intptr_t instead of figuring out
the right int size.
2024-05-25 19:05:44 +09:30
Adrian Johnson
b3656ed596 Update required libpng version 2024-05-25 10:25:51 +09:30
Adrian Johnson
bc4dfe51d2 Update required fontconfig version 2024-05-25 10:19:30 +09:30
Adrian Johnson
24d00b6309 Merge branch 'update-freetype' into 'master'
Update minimum FreeType to 2.10

See merge request cairo/cairo!557
2024-05-25 00:37:27 +00:00
Adrian Johnson
7f88aea155 ft: replace deprecated FT_Get_X11_Font_Format() 2024-05-25 09:02:53 +09:30
Adrian Johnson
94e3c5ce81 Update minimum FreeType to 2.10
and remove feature guards for FT functions that are in 2.10 or later.
2024-05-25 09:02:53 +09:30
Adrian Johnson
212f458949 Merge branch 'cff-global-subs-fix' into 'master'
CFF Fix crash when allocating zero size array

See merge request cairo/cairo!553
2024-05-24 21:44:13 +00:00
Adrian Johnson
1f0b80ed50 Merge branch 'update-meson-wraps' into 'master'
Update meson wraps

See merge request cairo/cairo!556
2024-05-24 21:29:49 +00:00
Uli Schlachter
f43dcc212d Merge branch 'fix-gradient-scale-crash' into 'master'
Fix "out of memory" when using linear gradient

Closes #789

See merge request cairo/cairo!535
2024-05-24 15:41:38 +00:00
Adrian Johnson
60fea22d5d Update meson wraps 2024-05-23 09:10:38 +09:30
Adrian Johnson
4796138f39 Merge branch 'pdf-finish' into 'master'
pdf: return subset status and always cleanup

See merge request cairo/cairo!554
2024-05-22 20:42:04 +00:00
Adrian Johnson
f3b3542456 Merge branch 'c11' into 'master'
Require C11

See merge request cairo/cairo!555
2024-05-22 20:38:41 +00:00
Koichi Akabe
d163670f97 Merge branch 'master' into fix-gradient-scale-crash 2024-05-22 10:19:50 +09:00
Adrian Johnson
b60f47dfd5 Require C11 2024-05-22 08:20:18 +09:30
Emmanuele Bassi
820bb0ba7f Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Emmanuele Bassi <ebassi@gmail.com>
2024-05-21 22:43:36 +00:00
Adrian Johnson
e29bd3f642 pdf: return subset status and always cleanup
_cairo_pdf_surface_finish() was not returning the status when
subsetting fails. Also ensure the surface is always cleaned up when
there is an error.
2024-05-22 07:38:18 +09:30
Emmanuele Bassi
d253188651 Merge branch 'moz-bug-1896173' into 'master'
pdf tags: Fix crash when popping the top most group following by a show_text

See merge request cairo/cairo!549
2024-05-21 11:59:14 +00:00
Emmanuele Bassi
4b775b97bf Merge branch 'moz-bug-1897561' into 'master'
Fix crash if font error in recording surface

See merge request cairo/cairo!551
2024-05-21 11:56:52 +00:00
Emmanuele Bassi
425b4c8347 Merge branch 'fix-pixman-enum' into 'master'
Only use PIXMAN_r8g8b8_sRGB if available

See merge request cairo/cairo!552
2024-05-21 11:53:53 +00:00
Adrian Johnson
d465f44911 cff: Don't try allocating a zero sized array 2024-05-21 20:38:20 +09:30
Adrian Johnson
3715d93bdf Create _cairo_calloc() macro to replace calloc()
Not all platforms handle a zero sized allocation in calloc the
same. This macro ensures that _cairo_calloc(0) always returns NULL
similar to _cairo_malloc(0).
2024-05-21 20:20:49 +09:30
Adrian Johnson
3d46485365 Only use PIXMAN_r8g8b8_sRGB if available
Pixman 0.42.3 added PIXMAN_r8g8b8_sRGB to pixman_format_code_t. CI
fails if it is missing from switch statements. Building with pixman <
0.42.3 will fail if the enum is used. So put it in a versioned #if.
2024-05-21 19:47:55 +09:30
Adrian Johnson
54cbe51481 Merge branch 'update-to-fedora-40' into 'master'
Update CI to Fedora 40

See merge request cairo/cairo!546
2024-05-21 09:41:13 +00:00
Adrian Johnson
0cd376ba0b Fix crash if font error in recording surface
https://bugzilla.mozilla.org/show_bug.cgi?id=1897561
2024-05-21 18:47:18 +09:30
Adrian Johnson
1a0933d67d pdf tags: Fix crash when popping the top most group following by a show_text
https://bugzilla.mozilla.org/show_bug.cgi?id=1896173
2024-05-19 10:53:54 +09:30
Adrian Johnson
c75997a4ea Merge branch 'dest-and-uri' into 'master'
Allow links to specify 'dest' and 'uri'

See merge request cairo/cairo!547
2024-05-15 22:12:24 +00:00
Adrian Johnson
cf1b42ca7c Merge branch 'build-svg-fuzzer' into 'master'
Mark _cairo_debug_svg_render() cairo_public

See merge request cairo/cairo!548
2024-05-15 22:11:32 +00:00
Uli Schlachter
877a8a4820 Mark _cairo_debug_svg_render() cairo_public
Without this, building with

  CFLAGS="-DDEBUG_SVG_RENDER" meson setup path/to/source

simply does not work for me:

    test/svg/svg-render.c:74:(.text+0x40): undefined reference to `_cairo_debug_svg_render'
    collect2: error: ld returned 1 exit status

After marking this symbol as exported, this just works.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2024-05-15 17:20:45 +02:00
Adrian Johnson
754f431642 Allow links to specify 'dest' and 'uri'
- If a link has both 'dest' and 'uri', the 'dest' will be used if it
  exists, otherwise it will fallback to using the 'uri'.

- Ensure that a missing 'dest' does not result in an error. Instead a
  warning is printed if CAIRO_DEBUG_TAG is set, and a link to the
  current location is embedded in the PDF. ie the link does
  nothing. Cairo needs to embed a link even if no destination is
  available because when links are embedded at the end of the
  document, the content stream already contains link tags.

- Remove cairo_pdf_interchange_write_forward_links. This code was
  originally used prior to !463 when cairo wrote the links at the end
  of each page. Now the links are written at the end of the document
  so there are no longer any forward links with an unknown
  destination, unless the destination does not exist.

- When 'internal' is not used, use the 'dest' name to reference the
  link. Ensure non ASCII names are correctly encoded.
2024-05-11 19:52:02 +09:30
Adrian Johnson
293b75a1c4 Update CI to Fedora 40 2024-04-28 21:28:41 +09:30
Adrian Johnson
27c8ad5cd8 Merge branch '838-confidential-issue' into 'master'
Switch to calloc in _cairo_cff_font_fallback_create

Closes #838

See merge request cairo/cairo!545
2024-04-27 21:39:13 +00:00
Daniel Holbert
5223f0c932 Switch to calloc in _cairo_cff_font_fallback_create
This makes this function more consistent with _cairo_cff_font_create, the other
function in this file that allocates fonts.
2024-04-25 16:44:00 -07:00
Uli Schlachter
b3d578ec2f Merge branch 'fix-warning' into 'master'
Fix implicit conversion warning

See merge request cairo/cairo!542
2024-04-17 15:57:04 +00:00