Commit graph

12230 commits

Author SHA1 Message Date
Adrian Johnson
ebac15cb04 copy all autotools compiler warnings to meson build 2021-08-14 07:24:40 +00:00
Adrian Johnson
87cf0fc285 Merge branch 'issue-404' into 'master'
Fix color fonts when antialias == SUBPIXEL or NONE

Closes #404

See merge request cairo/cairo!229
2021-08-14 07:06:35 +00:00
Adrian Johnson
1e446cb31e Fix color fonts when antialias == SUBPIXEL or NONE 2021-08-14 07:06:34 +00:00
Adrian Johnson
773236010f Merge branch 'endian' into 'master'
meson: add BIGENDIAN

See merge request cairo/cairo!214
2021-08-14 06:25:15 +00:00
Adrian Johnson
6ea9ec75ed Merge branch 'issue-389' into 'master'
Add color user-font support

See merge request cairo/cairo!223
2021-08-14 06:06:20 +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
bb10f06985 Merge branch 'mingw-warnings' into 'master'
Fix some mingw warnings and correct the value of R_OK

See merge request cairo/cairo!231
2021-08-07 07:23:55 +00:00
Adrian Johnson
76331f654e Fix some mingw warnings and correct the value of R_OK 2021-08-07 15:44:21 +09:30
Adrian Johnson
1091134258 Merge branch 'MMAP-bug' into 'master'
Fixed compile-time error on platforms without MMAP.

See merge request cairo/cairo!225
2021-08-07 05:38:04 +00:00
Adrian Johnson
ed017e10f9 Merge branch 'STRNDUP-bug' into 'master'
Added extra check for HAVE_STRNDUP in Win32 Mingw Meson build

See merge request cairo/cairo!226
2021-08-07 05:37:30 +00:00
Manuel Stoeckl
2fb156bdc0 Read/write 16-bpc PNG data in native endian
The png_set_swap function does not affect 8-bpc data.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
2021-08-06 19:09:03 -04:00
Adrian Johnson
69fdca480c Merge branch 'win32-printing-fix' into 'master'
Check correctly for surface_pattern being a recording in...

See merge request cairo/cairo!228
2021-08-04 11:41:24 +00:00
Jonathan Kew
67c91db455 Check correctly for surface_pattern being a snapshot/recording in _cairo_win32_printing_surface_paint_pattern.
(Corrected patch as proposed by Uli Schlachter.)

Fixes poor-quality print output on Windows reported in https://bugzilla.mozilla.org/show_bug.cgi?id=1721127.
2021-08-04 11:58:49 +01:00
Matthias Clasen
4e859ddb19 Fix compositing non-color glyphs in one case
The intention here is: "if show_text_glyphs is unsupported,
try show_gyphs". We need to make sure to set the status to
unsupported before checking it, otherwise we end up looking
at the status that was set by composite_color_glyphs if
show_text_glyphs is NULL.

This showed up in https://github.com/harfbuzz/harfbuzz/issues/2675
2021-08-02 12:37:27 -04:00
Rick Yorgason
ada76e80db Fixed compile-time error on platforms without MMAP. 2021-08-01 17:34:14 -07:00
Rick Yorgason
3ee18ffc28 Added extra check for HAVE_STRNDUP in Win32 Mingw Meson build
Mingw on Windows defines the strndup function, but it's not actually usable because string.h doesn't exist. See details on the Meson bug here: https://github.com/mesonbuild/meson/issues/3672

Note that although Meson marked this bug as "fixed", it's only fixed in the case where you're using `prefix : '#include <string.h>'`.
2021-08-01 17:30:06 -07:00
Heiko Lewin
4dd48f0979 Merge branch 'fix_infinite_loop' into 'master'
_arc_max_angle_for_tolerance_normalized: fix infinite loop

See merge request cairo/cairo!155
2021-08-01 11:16:04 +00:00
Heiko Lewin
ab2c5ee21e _arc_max_angle_for_tolerance_normalized: fix infinite loop 2021-08-01 11:16:03 +00:00
Heiko Lewin
6a916648d5 Merge branch 'fix_clip_leak' into 'master'
Fix clip leak

See merge request cairo/cairo!158
2021-08-01 11:10:40 +00:00
Heiko Lewin
7176cc8f0f Fix clip leak 2021-08-01 11:10:40 +00:00
Uli Schlachter
d88dd1794e Merge branch 'color-font-test' into 'master'
Add ft-color-font test

See merge request cairo/cairo!221
2021-07-31 05:58:33 +00:00
Adrian Johnson
7c6f2d4f24 Add ft-color-font test 2021-07-31 08:56:59 +09:30
Adrian Johnson
e2c002c570 meson: add endian check
Fixes #464
2021-07-31 06:34:30 +09:30
Adrian Johnson
814162d976 Merge branch 'pdf-links-fixes' into 'master'
pdf links: fix forward references to dest names with 'internal' flag

See merge request cairo/cairo!220
2021-07-29 20:29:10 +00:00
Adrian Johnson
ca1fb44dd3 pdf links: fix forward references to dest names with 'internal' flag 2021-07-29 07:31:31 +09:30
Adrian Johnson
47e6764de6 Merge branch 'tag-error' into 'master'
Print tag error details when CAIRO_DEBUG_TAG is defined

See merge request cairo/cairo!218
2021-07-28 21:28:28 +00:00
Adrian Johnson
24616585ec Print tag error details when CAIRO_DEBUG_TAG is defined
Add a _cairo_tag_error(fmt, ...) function that is used liked _cairo_error()
but allows an error message to be specified. When CAIRO_DEBUG_TAG is defined
the error is printed.
2021-07-29 06:00:37 +09:30
Adrian Johnson
4e3f6bf0c2 Merge branch 'pdf-object-streams' into 'master'
pdf: use cross-reference stream for PDF >= 1.5

See merge request cairo/cairo!197
2021-07-28 20:27:45 +00:00
Adrian Johnson
fb6f3eb32e pdf-tagged-text: generate both 1.4 and 1.5 PDFs 2021-07-28 06:18:01 +09:30
Adrian Johnson
d60e3f3501 Merge branch 'issue-426' into 'master'
pdf: use floating point widths when emitting fonts

Closes #426

See merge request cairo/cairo!213
2021-07-27 20:13:23 +00:00
Adrian Johnson
6fbfc9d927 pdf: use floating point widths when emitting fonts 2021-07-27 20:13:23 +00:00
Uli Schlachter
220222c5ff Merge branch 'issue-263' into 'master'
Win 64-bit fix pointer to long cast size mismatch

Closes #263

See merge request cairo/cairo!216
2021-07-27 15:53:03 +00:00
Adrian Johnson
6b8d8712fb pdf-tagged-text test: disable object stream compression
to allow the test to find the strings it is looking for.
2021-07-26 18:33:34 +09:30
Adrian Johnson
90193cc3a2 pdf: convert all document interchange features to use object streams 2021-07-26 18:31:57 +09:30
Adrian Johnson
bd514f6b08 pdf: add support for object streams for PDF >= 1.5
This allows all objects that were previously emitted uncompressed to
be compressed into a an object stream.

Currently only /Page, /Pages, and /Catalog have been converted to use
object streams.
2021-07-26 18:31:47 +09:30
Adrian Johnson
0f382eb087 pdf: use cross-reference stream for PDF >= 1.5
This reduces the output size and is required for object streams.
2021-07-26 18:31:33 +09:30
Adrian Johnson
d6fefd3156 Merge branch 'fix-wording' into 'master'
INSTALL.meson: correct the wording

See merge request cairo/cairo!217
2021-07-26 08:38:49 +00:00
Adrian Johnson
d1a8f20096 INSTALL.meson: correct the wording 2021-07-26 17:17:30 +09:30
Adrian Johnson
6872490e77 Merge branch 'meson-install' into 'master'
Add meson install instructions

See merge request cairo/cairo!206
2021-07-25 11:33:43 +00:00
Adrian Johnson
47c4dc4fcf Add meson install instructions 2021-07-25 11:33:42 +00:00
Adrian Johnson
908b243ab8 Merge branch 'svg-create-for-stream' into 'master'
svg: Fix create-for-stream test case

See merge request cairo/cairo!212
2021-07-25 03:21:03 +00:00
Adrian Johnson
62681fe052 Change FNV hash to 64-bit
Most builds are 64-bit where the uintptr_t type of the hash value and the font
face pointer that is being hashed are 64-bit.
2021-07-25 11:06:52 +09:30
Adrian Johnson
8d14a20a00 Fix some win32 compile warnings 2021-07-25 11:02:55 +09:30
Adrian Johnson
9fbf427548 Use uintptr_t for all casts between pointer and integer
On 64-bit windows, long is 32-bit. When compiling there are a large
number of warnings about mismatched sizes when casting long to/from a
pointer.

Use the (u)intptr_t type for any integer that will have a pointer stored
in it. Use a (u)intptr_t cast when integers are stored in pointers to
silence warnings.

Fixes #263
2021-07-25 11:01:20 +09:30
Uli Schlachter
099d71fb9f Merge branch 'issue-336' into 'master'
tags: allow links to page numbers not yet created

Closes #336

See merge request cairo/cairo!211
2021-07-24 12:58:17 +00:00
Uli Schlachter
4c6b604bd5 svg: Fix create-for-stream test case
Commit 2fbd53 added another test to create-for-stream that failed for
cairo-pdf. Manual testing shows that this test also fails for cairo-svg.
However, this was not noticed because even before this addition to the
test, create-for-stream already failed for cairo-svg. Since the
introduction on CI was done based on "let's ignore all current
failures", this hid the error.

This commit applies the trivial fix for cairo-svg to make this test
pass. It is basically the same error that cairo-pdf had.

Additionally, this removes the hack to ignore create-for-stream failures
in CI since it is now no longer necessary.

Thanks to Knut Peterson for reporting this [0].

[0]:
https://lists.cairographics.org/archives/cairo/2021-July/029291.html

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-07-24 14:42:26 +02:00
Adrian Johnson
f7c7bcb603 tags: allow links to page numbers not yet created
Previously, forward references were required to use named destinations.

This patch is based on the patch in #336 by Guillaume Ayoub <guillaume.ayoub@kozea.fr>
that converted all links to indirect objects written at the end of the document.

I have reworked the patch so that only forward references to future page numbers are
written as indirect objects. Backward references and named destinations remain as they
are. This is to minimize the number of objects written to the PDF file.

Fixes #336
2021-07-24 21:33:09 +09:30
Adrian Johnson
994eccefc0 Merge branch 'recording-playback-nothing-to-do' into 'master'
Don't assert on NOTHING_TO_DO during recording replay.

See merge request cairo/cairo!195
2021-07-24 08:19:16 +00:00
Adrian Johnson
d12e55672c Merge branch 'pdf-stdio-write-errors' into 'master'
pdf: Properly pass on stdio write errors

See merge request cairo/cairo!210
2021-07-24 08:08:44 +00:00
Uli Schlachter
e689e67004 Fix build on windows
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-07-23 17:32:39 +02:00