summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge branch 'colrv1-fix-crash' into 'master'Behdad Esfahbod2023-01-241-2/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | [colrv1] Fix crash in get_palette_color See merge request cairo/cairo!421
| * | | | [colrv1] Fix crash in get_palette_colorBehdad Esfahbod2023-01-231-2/+2
|/ / / / | | | | | | | | | | | | is_foreground_color can be NULL.
* | | | Merge branch 'fix-svg-crash' into 'master'Adrian Johnson2023-01-2112-6/+15
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Fix svg renderer crash See merge request cairo/cairo!416
| * | | svg-font: fix parse bug on empty tagsAdrian Johnson2023-01-201-1/+1
| | | |
| * | | svg-font: return SVG_FONT_ERROR on errorAdrian Johnson2023-01-2012-5/+14
| | | |
* | | | Merge branch 'custom-color-palette-2' into 'master'Adrian Johnson2023-01-216-23/+156
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Add custom palettes for COLRv1 and SVG fonts See merge request cairo/cairo!417
| * | | | Reshuffle code for clarityMatthias Clasen2023-01-201-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Only loop over custom colors if we got a palette selected successfully.
| * | | | Use the custom palette for COLv1 rendererMatthias Clasen2023-01-201-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the font options contain a custom palette, overwrite the palette we got from freetype with the custom entries.
| * | | | Add a custom palette to font optionsMatthias Clasen2023-01-203-4/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a way to define a custom color palette as part of cairo_font_options_t. To use the custom palette when rendering color fonts, set the palette index to CAIRO_COLOR_PALETTE_CUSTOM.
| * | | | cairo-ft: Pass the palette to the COLRv1 rendererMatthias Clasen2023-01-203-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It an unnecessary complication for use to pass the palette index, and have the COLRv1 renderer pull the palette out of the FT_Face, after we just selected it.
| * | | | cairo-ft: Fix palette handlingMatthias Clasen2023-01-201-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | We were returning the number of palettes where the number of palette entries was expected, leading to array overruns. Oops
* | | | Merge branch 'scaled-font-options' into 'master'Behdad Esfahbod2023-01-194-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | [scaled-font] Clean up font-options before copy See merge request cairo/cairo!415
| * | | | [scaled-font] Clean up font-options before copyBehdad Esfahbod2023-01-194-0/+4
|/ / / /
* | | | Merge branch 'gstate-font-options' into 'master'Uli Schlachter2023-01-191-1/+3
|\ \ \ \ | |/ / / |/| | | | | | | | | | | [gstate] Fix cairo_font_options_t memory management See merge request cairo/cairo!414
| * | | [gstate] Fix cairo_font_options_t memory managementBehdad Esfahbod2023-01-181-1/+3
|/ / / | | | | | | | | | | | | cairo_font_options_t has grown to have malloc'ed memory, so the previous code was leaking, and double-freeing.
* | | Merge branch 'colrv1-stack-variable' into 'master'Adrian Johnson2023-01-171-18/+8
|\ \ \ | | | | | | | | | | | | | | | | [COLRv1] Allocate context variable on the stack See merge request cairo/cairo!410
| * | | [COLRv1] Allocate context variable on the stackBehdad Esfahbod2023-01-171-18/+8
| | | |
* | | | Merge branch 'optimize-paint-composite' into 'master'Adrian Johnson2023-01-171-4/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | [COLRv1] Optimize paint-composite See merge request cairo/cairo!411
| * | | | [COLRv1] Optimize paint-compositeBehdad Esfahbod2023-01-171-4/+0
| |/ / / | | | | | | | | | | | | See https://github.com/googlefonts/colr-gradients-spec/issues/369
* | | | Merge branch 'colr-foreground-alpha' into 'master'Adrian Johnson2023-01-171-2/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | [COLRv1] Apply alpha to foreground color See merge request cairo/cairo!409
| * | | | [COLRv1] Apply alpha to foreground colorBehdad Esfahbod2023-01-171-2/+6
| |/ / /
* | | | Merge branch 'colrv1-fixes' into 'master'Adrian Johnson2023-01-172-7/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COLR v1 font render fixes Closes #624 and #623 See merge request cairo/cairo!407
| * | | | colrv1: Fix palette alphaAdrian Johnson2023-01-171-1/+3
| | | | | | | | | | | | | | | | | | | | Fixes #624
| * | | | colrv1: Don't use EM size when hint metrics is offAdrian Johnson2023-01-171-0/+15
| | | | | | | | | | | | | | | | | | | | Fixes #623
| * | | | Ensure outline font is used when CAIRO_COLOR_MODE_NO_COLOR is setAdrian Johnson2023-01-171-6/+8
| |/ / /
* | | | Merge branch 'fix-device-scaling-doc-comments' into 'master'Emmanuele Bassi2023-01-171-2/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | Fix docs for cairo_surface_[sg]et_device_scale Closes #616 See merge request cairo/cairo!396
| * | | Fix docs for cairo_surface_[sg]et_device_scaleUli Schlachter2023-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/616 Signed-off-by: Uli Schlachter <psychon@znc.in>
* | | | Merge branch 'fix-shared-recording-surface' into 'master'Adrian Johnson2023-01-1629-177/+1442
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix shared use of recording surfaces See merge request cairo/cairo!391
| * | | | Fix shared use of recording surface with paginated targetsAdrian Johnson2023-01-1523-177/+1001
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is _cairo_recording_surface_replay_and_create_regions() stores the cairo_recording_region_type_t in the same structure as the recording commands. This does not work well when the recording surface is used as source by multiple surfaces Fix this by moving the cairo_recording_region_type_t into a separate struct cairo_recording_regions_array_t. This struct is stored in a list that allows multiple create regions results to be store in the surface. The new function _cairo_recording_surface_region_array_attach() is used to create a new cairo_recording_regions_array_t, attach it to the recording surface and return a unique region id. The _cairo_recording_surface_replay_and_create_regions() and _cairo_recording_surface_replay_region() functions use this region id to identify the cairo_recording_regions_array_t. To handle nested recording surfaces, when replaying a recording, the region id is passed to the target as an extra parameter in the surface pattern. The wrapper surface makes a temporary copy of the pattern to ensure the snapshot pattern in the recording surface is not modified. cairo_recording_regions_array_t has a reference count so the target can hold on to the cairo_recording_regions_array_t after the paginated surface has called _cairo_recording_surface_region_array_remove().
| * | | | pdf-tagged-text depends on PDFAdrian Johnson2023-01-151-0/+5
| | | | |
| * | | | Add a test that demonstrates a recording surface bug when re-used on ↵Adrian Johnson2023-01-155-0/+436
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different surfaces There is a bug in the recording surface where if one recording surface is used as the same source on different paginated targets that support fine grained fallbacks, the output may be incorrect because the analysis results of a previous target are re-used on another target.
* | | | | Merge branch 'meson-and-doc-fixes' into 'master'Adrian Johnson2023-01-168-21/+32
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Meson and documentation fixes See merge request cairo/cairo!406
| * | | | | Documentation fixesAdrian Johnson2023-01-153-3/+2
| | | | | |
| * | | | | Add emacs modeline to CODING_STYLEAdrian Johnson2023-01-151-0/+1
| | | | | |
| * | | | | We don't use HAVE_CONFIG_H anymoreAdrian Johnson2023-01-152-4/+1
| | | | | |
| * | | | | README fixesAdrian Johnson2023-01-152-14/+28
| |/ / / /
* | | | | Merge branch 'test-png16-load' into 'master'Uli Schlachter2023-01-157-1/+86
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Add test for loading 16 bit PNG images See merge request cairo/cairo!241
| * | | | Add test for loading 16 bit PNG imagesManuel Stoeckl2023-01-115-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The base image has 16 bits per channel, with colors that do not have an exact corresponding 8 bit representation. The reference image uses 8bpc, like the rgb24/argb32 formatted images which the test outputs.
| * | | | Add remaining image formats to cairo-script constants tableManuel Stoeckl2023-01-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to read cairo-script files which embed RGB30/RGB96F/RGBA128F images.
| * | | | Add array bounds check for xrender format lookupManuel Stoeckl2023-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, images with RGB30, RGB96F, and RGBA128F formats would have been given garbage xrender formats; now such images use the fallback path and are converted to formats with an xrender equivalent.
* | | | | Merge branch 'defining-windows-version-macros-in-meson-build' into 'master'Adrian Johnson2023-01-1216-94/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Defining Windows version macros in meson.build See merge request cairo/cairo!404
| * | | | | Defining Windows version macros in meson.buildFujii Hironori2023-01-1316-94/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WINVER and _WIN32_WINNT macros were defined in each source files and headers that were including <windows.h>. However, because DirectWrite requires new Windows API, some files included <windows.h> without the version macros. This inconsistency sometimes caused troubles. Define the version macros in meson.build.
* | | | | | Merge branch 'eps' into 'master'Adrian Johnson2023-01-121-0/+4
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | PS: Wrap embedded EPS in %%BeginDocument/%%EndDocument as required by EPS spec Closes #620 See merge request cairo/cairo!403
| * | | | | PS: Wrap embedded EPS in %%BeginDocument/%%EndDocument as required by EPS specAdrian Johnson2023-01-121-0/+4
|/ / / / / | | | | | | | | | | | | | | | Fixes #620
* | | | | Merge branch 'bug-606' into 'master'Adrian Johnson2023-01-112-14/+28
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | sizeof(cairo_atomic_int_t) should be sizeof(int) Closes #606 See merge request cairo/cairo!401
| * | | | sizeof(cairo_atomic_int_t) should be sizeof(int)Fujii Hironori2023-01-112-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `_cairo_status_set_error` was using `_cairo_atomic_int_cmpxchg` to set a `cairo_status_t` variable by casting a `cairo_status_t*` to `cairo_atomic_int_t*`. `cairo_atomic_int` has a generic implementation which is using a mutex. In the implementation, `cairo_atomic_int_t` was typedef-ed to `cairo_atomic_intptr_t`. In a typical 64bit system, cairo_atomic_intptr_t is 64bit and cairo_status_t is 32bit, _cairo_status_set_error didn't work as expected. Define `cairo_atomic_int_t` as an alias of `int`. Added an assertion in `_cairo_status_set_error` to ensure that `*err` has the same size with `cairo_atomic_int_t`. Fixes cairo/cairo#606
* | | | | Merge branch 'bug-619' into 'master'Adrian Johnson2023-01-111-1/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the unbounded recording surface assertion Closes #619 See merge request cairo/cairo!399
| * | | | | Remove the unbounded recording surface assertionFujii Hironori2023-01-101-1/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an assertion in `_cairo_recording_surface_acquire_source_image` to ensure the surface isn't unbounded. However, this assertion was failing for `record-paint` test on Windows. Removed the assertion and return `CAIRO_INT_STATUS_UNSUPPORTED` if the surface is unbounded. Fixes cairo/cairo#619
* | | | | Merge branch 'bug-566' into 'master'Adrian Johnson2023-01-101-26/+12
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DWrite: Don't call _controlfp_s with MCW_PC Closes #566 See merge request cairo/cairo!400
| * | | | | DWrite: Don't call _controlfp_s with MCW_PCFujii Hironori2023-01-111-26/+12
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GeometryRecorder class was calling _controlfp_s with MCW_PC to reset the floating point precision to default. However, MCW_PC isn't supported for ARM or x64 platforms. It reports an assertion failure for them. And, Cairo isn't changing the MCW_PC setting. Removed the calls. Also, removed `GetFixedX` and `GetFixedY` methods because they called only `_cairo_fixed_from_double`. Fixes cairo/cairo#566