summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-27Merge branch '838-confidential-issue' into 'master'HEADmasterAdrian Johnson1-1/+1
Switch to calloc in _cairo_cff_font_fallback_create Closes #838 See merge request cairo/cairo!545
2024-04-25Switch to calloc in _cairo_cff_font_fallback_createDaniel Holbert1-1/+1
This makes this function more consistent with _cairo_cff_font_create, the other function in this file that allocates fonts.
2024-04-17Merge branch 'fix-warning' into 'master'Uli Schlachter1-1/+1
Fix implicit conversion warning See merge request cairo/cairo!542
2024-04-17Fix implicit conversion warningAdrian Johnson1-1/+1
GCC 12.2 reports the following warning: [3/16] Compiling C object util/cairo-script/libcairo-script-interpreter.so.2.11801.1.p/cairo-script-scanner.c.o ../util/cairo-script/cairo-script-scanner.c:1562:38: warning: implicit conversion from 'int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion] if (real >= INT32_MIN && real <= INT32_MAX && (int) real == real) ~~ ^~~~~~~~~ /usr/include/stdint.h:123:22: note: expanded from macro 'INT32_MAX' ^~~~~~~~~~
2024-04-16Merge branch 'alloca' into 'master'Tim-Philipp Müller2-0/+5
Fix alloca undefined on Solaris See merge request cairo/cairo!540
2024-04-15Fix alloca undefined on SolarisAlan Coopersmith2-0/+5
Solaris defines alloca in the <alloca.h> header ../src/cairo-colr-glyph-render.c: In function ‘add_sweep_gradient_patches’: ../src/cairo-colr-glyph-render.c:661:14: error: implicit declaration of function ‘alloca’ [-Werror=implicit-function-declaration] 661 | angles = alloca (sizeof (double) * cl->n_stops); | ^~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-04-14Merge branch 'ci-meson-windows' into 'master'Tim-Philipp Müller1-5/+2
ci: install latest Meson on windows jobs See merge request cairo/cairo!541
2024-04-14ci: install latest Meson on windows jobsTim-Philipp Müller1-5/+2
Looks like fontconfig requires a newer Meson than what's installed in the image.
2024-04-05Merge branch 'bugfix/cross-compile' into 'master'Uli Schlachter1-1/+1
meson: always skip IPC_RMID_DEFERRED_RELEASE check when cross compiling See merge request cairo/cairo!534
2024-04-01Merge branch 'master' into 'master'Emmanuele Bassi23-0/+0
tests: remove gl reference images See merge request cairo/cairo!539
2024-04-01tests: remove gl reference imagesFélix Poisot23-0/+0
Leftover from b5793081
2024-03-21Merge branch 'ft-font-accuracy-new' into 'master'Adrian Johnson1-50/+53
Improve accuracy of computed metrics for FT fonts See merge request cairo/cairo!533
2024-03-21Merge branch 'prefer-colrv1-table' into 'master'Adrian Johnson2-17/+38
Prefer COLRv1 table See merge request cairo/cairo!537
2024-03-21Prefer COLRv1 tableMarek Kasik2-17/+38
2024-03-20Merge branch 'ci-artefacts' into 'master'Tim-Philipp Müller1-1/+7
ci: bump windows image and keep meson logs around for msvc builds See merge request cairo/cairo!538
2024-03-20ci: keep meson logs in windows builds as artefactsTim-Philipp Müller1-0/+5
2024-03-20ci: update windows imageTim-Philipp Müller1-1/+2
2024-02-17Merge branch 'surface-error-png' into 'master'Adrian Johnson2-6/+5
_cairo_surface_create_in_error(): Add PNG_ERROR support See merge request cairo/cairo!524
2024-02-06meson: always skip IPC_RMID_DEFERRED_RELEASE check when cross-compilingThomas Devoogdt1-1/+1
../../br-test-pkg/bootlin-armv5-uclibc/build/cairo-1.17.4/meson.build:279:13: ERROR: Can not run test applications in this cross environment. Commit 1bec56ea8a931e1ae1c74cc740134497ec365267 added support to define ipc_rmid_deferred_release in a cross-compile config, but still kept the default to auto, which anyhow results in an error when cross-compiling. There is only one usage of the ipc_rmid_deferred_release compile declarative which was originally added in this commit: 5041b462d084de8552336275914d30c23bf5dd35. If ipc_rmid_deferred_release is set to FALSE, an additional XSync is performed. This doesn't sound very harmful, so that is why this commit defaults to FALSE and thus avoids any cross-compile errors. Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
2024-01-22Improve accuracy of computed metrics for FT fontsVincent Lefevre1-50/+53
In particular, with bitmap fonts, a floating-point error was affecting y_bearing, yielding a value close to an integer instead of the integer exactly. The change consists in replacing some operations of the form A * (1/B) by A/B. Details of the issue in #503. This new code will not always avoid rounding errors in final values when these values could be exact, but it makes some of these errors disappear. The changes in the src/cairo-ft-font.c code consists of: * Define the SCALE() macro (with some explanations in a comment). * Remove the declarations and definitions of x_factor and y_factor. * Update the code to use SCALE() instead of x_factor and y_factor. perl -pi -e 's{(DOUBLE_\w+) ?(\(.*\)) \* ([xy])_factor} {SCALE (\1 \2, unscaled->\3_scale)}' \ src/cairo-ft-font.c * Replace the remaining 0 * x_factor and 0 * y_factor by 0.
2024-01-18Merge branch 'fix-issue-811' into 'master'Emmanuele Bassi1-0/+11
Cairo 1.18.0 doesn't draw italic or bold text on Mac See merge request cairo/cairo!531
2024-01-17[quartz] Fix: Cairo 1.18.0 doesn't draw italic or bold text on MacDiego Pino Garcia1-0/+11
Commit cf351a8a attempted to convert the font generation in '_cairo_quartz_font_create_for_toy' to use CTFontCreateWithName and that uses only Postscript Names, meaning with the hyphens. Commit c6dc5df6 converted back to CGFont. CGFontCreateWithFontName is supposed to work with Postscript Names, but it seems sometimes it does not. In case a CGFont cannot be created using Postscript Names, attempt unhyphenated version of font family name.
2024-01-17Merge branch 'font-options' into 'master'Adrian Johnson11-0/+131
Copy font-options during creation of a fallback font Closes #819 See merge request cairo/cairo!530
2024-01-16Copy font-options during creation of a fallback fontBehdad Esfahbod11-0/+131
Specially important for font variations, which before did not work in PDF, etc, output. Script surface is not updated. It seems out of date with all recent additions to cairo_font_options_t, so it loses the variations :(. Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/819
2023-12-01Merge branch 'pdf-userfont-stroke' into 'master'Adrian Johnson1-0/+8
[pdf] Set both fill and stroke colors in show_text_glyphs Closes #813 See merge request cairo/cairo!527
2023-11-30[pdf] Set both fill and stroke colors in show_text_glyphsBehdad Esfahbod1-0/+8
Since a user-font might be calling stroke, and PDF has separate stroke and fill colors. Note that this bug was not exposed in Poppler. It's probably a bug there. But multiple other viewers expoed this bug. Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/813
2023-11-06Merge branch 'alloc-size' into 'master'Emmanuele Bassi1-1/+1
cairo-ps-surface: fix -Walloc-size See merge request cairo/cairo!525
2023-11-05cairo-ps-surface: fix -Walloc-sizeSam James1-1/+1
GCC 14 introduces a new -Walloc-size included in -Wextra which gives: ``` src/cairo-ps-surface.c:3524:18: warning: allocation of insufficient size ‘1’ for type ‘cairo_ps_form_t’ {aka ‘struct _cairo_ps_form’} with size ‘88’ [-Walloc-size] ``` The calloc prototype is: ``` void *calloc(size_t nmemb, size_t size); ``` So, just swap the number of members and size arguments to match the prototype, as we're initialising 1 struct of size `sizeof(cairo_ps_form_t)`. GCC then sees we're not doing anything wrong. Signed-off-by: Sam James <sam@gentoo.org>
2023-10-31_cairo_surface_create_in_error(): Add PNG_ERROR supportUli Schlachter2-6/+5
Traditionally, loading a malformed PNG file with cairo_image_surface_create_from_png() resulted in CAIRO_STATUS_NO_MEMORY. This was apparently changed in commit c5ee3f11b5f by adding CAIRO_STATUS_PNG_ERROR and using it for errors returned from libpng. However, I don't see how this was supposed to actually work. There are a couple of error codes supported by _cairo_surface_create_in_error(). Anything else is turned into CAIRO_STATUS_NO_MEMORY, which is not a helpful status. For this reason, CAIRO_STATUS_PNG_ERROR would be turned into CAIRO_STATUS_NO_MEMORY. This commit adds support for CAIRO_STATUS_PNG_ERROR to _cairo_surface_create_in_error() so that this error can actually be returned to the caller. Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-10-26Merge branch 'kCTFontTraitColorGlyphs' into 'master'Uli Schlachter1-2/+2
quartz-font: Fix transposed constants Closes #810 See merge request cairo/cairo!523
2023-10-24quartz-font: Fix transposed constantsRyan Schmidt1-2/+2
kCTFontColorGlyphsTrait is available in Mac OS X 10.7 and later. kCTFontTraitColorGlyphs is available in OS X 10.8 and later. Fixes build failure on Mac OS X 10.7. Closes #810
2023-10-02Merge branch 'require-pixman-0.40' into 'master'Emmanuele Bassi4-20/+1
Require pixman >= 0.40 See merge request cairo/cairo!522
2023-10-02Merge branch 'fix-tags-incorrect-surface' into 'master'Adrian Johnson1-1/+4
Fix surface type mismatch error in pdf-interchange See merge request cairo/cairo!521
2023-10-02Require pixman >= 0.40Adrian Johnson4-20/+1
2023-10-02Fix surface type mismatch error in pdf-interchangeAdrian Johnson1-1/+4
2023-10-02Merge branch 'msvc-alloca-fix' into 'master'Adrian Johnson1-0/+4
Fix alloca undefined with MSVC Closes #808 See merge request cairo/cairo!520
2023-09-30Fix alloca undefined with MSVCDan Yeaw1-0/+4
Conditionally includes malloc.h when compiling with MSVC so that alloca is defined.
2023-09-28Merge branch 'remove-malloc-stats' into 'master'Emmanuele Bassi3-396/+0
util: remove malloc-stats Closes #640 See merge request cairo/cairo!519
2023-09-28util: remove malloc-statsTim-Philipp Müller3-396/+0
Not really cairo-related and has now been moved into a separate repository at https://github.com/behdad/malloc-stats Fixes #640
2023-09-23Merge branch 'master-next' into 'master'Emmanuele Bassi20-101/+453
Release Cairo 1.18.0 See merge request cairo/cairo!517
2023-09-23Post-release version bump to 1.18.1Emmanuele Bassi1-1/+1
2023-09-23Release Cairo 1.18.01.18.0Emmanuele Bassi2-2/+46
2023-09-23ci: Remove manual doc checks in the build jobEmmanuele Bassi1-5/+0
The doc syntax and coverage are part of the test suite.
2023-09-23build: Fix program listing syntax checkEmmanuele Bassi1-3/+3
The modern gtk-doc syntax for program listing is `|[ ... ]|`.
2023-09-23docs: Fix closing docblockEmmanuele Bassi2-20/+20
2023-09-23docs: Use the proper xinclude pathEmmanuele Bassi1-1/+1
The XML files are moved in the xml directory.
2023-09-23docs: Remove docblockEmmanuele Bassi1-1/+1
The gtk-doc parser will not respect `#if 0 ... #endif` blocks.
2023-09-23docs: Add missing docblocks for surface observer APIEmmanuele Bassi2-5/+130
2023-09-23docs: Add docblocks for missing feature definesEmmanuele Bassi4-1/+36
2023-09-23docs: Add missing docblocks for cairo-tee APIEmmanuele Bassi2-5/+55
The tee API has been left undocumented all this time.