Commit graph

13100 commits

Author SHA1 Message Date
Adrian Johnson
0560aa5819 Merge branch 'master' into 'master'
fix read memory access

See merge request cairo/cairo!496
2023-07-20 22:24:05 +00:00
iasunsea
9a2385d412 fix read memory access 2023-07-21 00:46:44 +08:00
Tim-Philipp Müller
48a4466631 Merge branch 'fix-pulling-ft2-and-fc' into 'master'
Don't pull in FreeType and Fontconfig on Windows and Darwin

See merge request cairo/cairo!495
2023-07-20 14:50:07 +00:00
Adrian Johnson
3f732bd3d9 Merge branch 'master' into 'master'
cairo truetype reverse cmap detected memory leaks

See merge request cairo/cairo!494
2023-07-18 21:53:09 +00:00
Adrian Johnson
35a38406f5 Merge branch '5898791338508288' into 'master'
Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56152

See merge request cairo/cairo!493
2023-07-18 21:33:01 +00:00
Alex
af83da70f5 Refix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56152 according to recommendations 2023-07-18 12:04:59 +00:00
Sergey Bugaev
7fe4f00721 Apply 1 suggestion(s) to 1 file(s) 2023-07-17 15:28:32 +00:00
Sergey Bugaev
bcb7937545 Consistently spell "FreeType" with capital T
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-07-17 15:35:40 +03:00
Sergey Bugaev
a3a7ca452f meson: Don't pull in FreeType and Fontconfig by default
Commit f6a3f6d8ad
"Don't build fontconfig on Windows" made an attempt to prevent Meson
from automatically building Fontconfig as a subproject on Windows when
the 'fontconfig' option has its default value of 'auto'.

Unfortunately, this only made things worse instead of fixing them.

Meson feature options can have three states: 'enabled', 'auto', and
'disabled'. They are primarily intended to be used as a value for the
'required' option of the 'dependency()' function. When the system
dependency is not found, but a fallback subproject is provided
explicitly with the 'fallback' option, a feature option in the 'auto'
state still causes the subproject to get built.

Since there's no apparent way to produce a value of the "feature option
object" type in a specific state, commit f6a3f6d8ad instead
set fontconfig_option = false (when it wasn't set to 'enabled', i.e. it
was either 'auto' or 'disabled') in an attempt to disable building the
subproject. However, a boolean value of false is equivalent to 'auto',
not to 'disabled'. This is documented at
https://mesonbuild.com/Build-options.html#features

So commit f6a3f6d8ad wanted to convert
'auto' to 'disabled', but instead effectively converted 'disabled' to
'auto', causing the Fontconfig subproject to be always built on Windows,
even when explicitly turned off with -D fontconfig=disabled.

A way to accomplish the original goal is available since Meson 0.59;
feature option objects gained the '.disable_auto_if()' method that
exactly converts 'auto' to 'disabled' if the boolean condition is true.
So make use of this method to properly turn off building Fontconfig on
Windows, unless explicitly enabled with -D fontconfig=enabled.

Apply the same for FreeType, which is also not very useful on Windows.

See also: 7f8135bfeb

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-07-17 15:34:44 +03:00
iasunsea
e2e826b0b1 cairo truetype reverse cmap detected memory leaks 2023-07-14 23:01:14 +08:00
Alex
90e38be99d Fix warning 2023-07-10 19:01:32 +00:00
Alex
2ecbfbce46 Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56152 memory read access because of incorrect size 2023-07-10 18:36:53 +00:00
Emmanuele Bassi
e97cfe0b73 Merge branch 'readme-gl' into 'master'
readme: drop reference to OpenGL backend

See merge request cairo/cairo!492
2023-07-10 11:58:50 +00:00
Simon Ser
0ccaf5bd68 readme: drop reference to OpenGL backend
The experimental OpenGL backend has been removed in [1]. Let's drop the
stale reference from the README.

[1]: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/287
2023-07-10 12:50:38 +02:00
Adrian Johnson
2919f392d3 Merge branch 'check-def-arches' into 'master'
meson-check-def: Exclude sections from symbol list seen on ARM & MIPS

See merge request cairo/cairo!488
2023-07-03 21:34:58 +00:00
Adrian Johnson
718e577adf Merge branch 'fix-no-png-build' into 'master'
Disable svg glyph renderer when PNG is disabled

Closes #784

See merge request cairo/cairo!489
2023-07-03 21:27:48 +00:00
Uli Schlachter
5ef0375a7d Disable svg glyph renderer when PNG is disabled
When trying to build with -Dpng=disabled with a new enough FreeType
version, the build would fail in cairo-svg-glyph-renderer.c:

    src/cairo-svg-glyph-render.c:1841:15: error: implicit declaration of
    function ‘cairo_image_surface_create_from_png_stream’; did you mean
    ‘cairo_image_surface_create_for_data’?
    [-Werror=implicit-function-declaration]

Fix this by disabling HAVE_FT_SVG_DOCUMENT when png is not enabled.

Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/784
Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-07-03 18:06:17 +02:00
Uli Schlachter
e7aa3a4c09 Merge branch 'hurd' into 'master'
Hurd has no MAP_NORESERVE so don't use it there

See merge request cairo/cairo!486
2023-07-03 15:06:14 +00:00
Jeremy Bícha
5118007b06 meson-check-def: Exclude sections from symbol list seen on mips 2023-07-03 09:30:51 -04:00
Jeremy Bícha
67c0202674 meson-check-def: Exclude sections from symbol list seen on ARM 2023-07-03 09:30:48 -04:00
Sebastian Dröge
baf2593852 Hurd has no MAP_NORESERVE so don't use it there 2023-07-02 10:19:06 -04:00
Uli Schlachter
0317aafd3f Merge branch 'fix-signed-left-shift' into 'master'
Avoid undefined signed left shift

See merge request cairo/cairo!484
2023-07-01 07:49:34 +00:00
Adrian Johnson
afac8b0e7d Avoid undefined signed left shift
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1841190
2023-06-30 18:43:00 +09:30
Uli Schlachter
42555cb0a7 Merge branch 'tag_stack' into 'master'
Fix use-after-free in _cairo_tag_stack_pop

See merge request cairo/cairo!483
2023-06-29 15:11:17 +00:00
Jonathan Kew
4e0f76473f Fix use-after-free in _cairo_tag_stack_pop 2023-06-29 12:52:33 +00:00
Adrian Johnson
d68eb3c8df Merge branch 'fix-colrv0-handling' into 'master'
Fix rendering of COLRv0 fonts

See merge request cairo/cairo!482
2023-06-06 22:01:01 +00:00
Matthias Clasen
05c6bb4ce1 Fix rendering of COLRv0 fonts
This was found while debugging why The Twemoji Mozilla
font renders a white-on-while in pango.

We need to call _render_glyph_bitmap, since we want
FT_Render_Glyph to handle the COLRv0 layers for us.
2023-06-06 14:44:52 -04:00
Adrian Johnson
111095d9dd Merge branch 'update-to-fedora-38' into 'master'
Update CI to Fedora 38

See merge request cairo/cairo!474
2023-06-05 22:18:33 +00:00
Adrian Johnson
90fda58934 Fix PS crash with color font and CAIRO_COLOR_MODE_NO_COLOR 2023-06-05 22:04:46 +09:30
Adrian Johnson
c381a773de Update CI to Fedora 38 2023-06-05 22:04:33 +09:30
Uli Schlachter
38873d2568 Merge branch 'fix-leftover' into 'master'
Remove stray #error in dw-extra.h

See merge request cairo/cairo!481
2023-05-31 15:06:51 +00:00
Luca Bacci
50225f55ba Remove stray #error in dw-extra.h 2023-05-31 12:28:56 +02:00
Adrian Johnson
a2def1bd06 Merge branch 'ci-bump-windows-image' into 'master'
ci: bump windows image to latest

See merge request cairo/cairo!480
2023-05-30 22:00:03 +00:00
Tim-Philipp Müller
bb5577616c ci: bump windows image to latest 2023-05-29 11:06:06 +01:00
Adrian Johnson
0d7e0dcb17 Merge branch 'issue-782' into 'master'
Use a spinlock to prevent race condition when initializing mutexes

Closes #782

See merge request cairo/cairo!478
2023-05-27 10:20:57 +00:00
Adrian Johnson
46e538ddbb Use a spinlock to prevent race condition when initializing mutexes
Fixes #782
2023-05-27 19:01:47 +09:30
Adrian Johnson
9831eba0ec Merge branch 'issue-778' into 'master'
ft: don't use scaled_glyph->dev_private to store data

Closes #778

See merge request cairo/cairo!476
2023-05-13 22:07:36 +00:00
Adrian Johnson
10cc34f521 ft: don't use scaled_glyph->dev_private to store data
It is also used by the xlib surface.

Fixes #778
2023-05-13 18:53:16 +09:30
Adrian Johnson
8d6586f49f Merge branch 'issue-777' into 'master'
Don't assume HAVE_FT_PALETTE_SELECT is defined when HAVE_FT_SVG_DOCUMENT is defined

Closes #777

See merge request cairo/cairo!475
2023-04-30 08:35:19 +00:00
Adrian Johnson
b86f24634c Don't assume HAVE_FT_PALETTE_SELECT is defined when HAVE_FT_SVG_DOCUMENT is defined
Fixes #777
2023-04-30 17:26:36 +09:30
Adrian Johnson
17ed347819 Merge branch 'issue-508' into 'master'
Fix cairo_tag_begin/end in groups

Closes #508

See merge request cairo/cairo!463
2023-04-18 11:06:46 +00:00
Adrian Johnson
de9452438e pdf: Don't use snprintf() to print floats
It is not locale independent.
2023-04-18 18:27:12 +09:30
Adrian Johnson
b53b48116e Make cairo_tag_begin/end work correctly in groups
Fixes #508
2023-04-18 18:27:12 +09:30
Adrian Johnson
e7ed40a71d cairo-list-inline.h: fixes and documentation
- Fix a bug in cairo_list_is_singular
- Rename cairo_list_swap() to cairo_list_move_list()
  to better describe what it is doing.
2023-04-16 20:17:09 +09:30
Adrian Johnson
5e74744dff Merge branch 'issue-776' into 'master'
win32: InterlockedCompareExchange uses LONG

Closes #776

See merge request cairo/cairo!472
2023-04-16 10:10:03 +00:00
Adrian Johnson
10747fe813 Merge branch 'ci-windows-image-update' into 'master'
ci: bump windows image to latest and add workflow rules

See merge request cairo/cairo!473
2023-04-16 10:06:43 +00:00
Tim-Philipp Müller
47ec81544f ci: add some more workflow rules
cargo-culted from the ci-templates template.
2023-04-16 10:19:22 +01:00
Tim-Philipp Müller
8322ef3733 ci: bump windows image to latest 2023-04-16 10:10:56 +01:00
Adrian Johnson
16074af6a1 win32: InterlockedCompareExchange uses LONG
Fixes #776
2023-04-13 06:03:22 +09:30
Adrian Johnson
ec14ec47f7 Merge branch 'riastradh-20220406-ctype-misuse' into 'master'
Avoid misuse of ctype(3) functions

See merge request cairo/cairo!309
2023-03-29 10:28:10 +00:00