summaryrefslogtreecommitdiff
path: root/src/cairoint.h
Commit message (Collapse)AuthorAgeFilesLines
* Make cairo_tag_begin/end work correctly in groupsAdrian Johnson2023-04-181-0/+1
| | | | Fixes #508
* Merge branch 'drop-xml-surface' into 'master'Emmanuele Bassi2023-03-021-2/+1
|\ | | | | | | | | Remove XML surface See merge request cairo/cairo!446
| * Remove XML surfaceEmmanuele Bassi2023-02-041-2/+1
| | | | | | | | | | | | According to the Debian code search tool, nothing uses it as part of the Cairo public API, and it has been disabled for a long time with nobody complaining about it.
* | Implement a font options compare function and use it in gstateAdrian Johnson2023-02-081-0/+4
|/ | | | | Valgrind is not happy with the memcmp() to compare font options and it won't work correctly with variations and custom_palette.
* PDF Type 3 color fontsAdrian Johnson2023-01-291-0/+9
| | | | | | | | | This implements Type 3 color fonts for PDF for any font with a CAIRO_SCALED_GLYPH_INFO_RECORDING_SURFACE. This includes user-fonts, SVG fonts, and COLR fonts. Glyphs with foreground colors are not yet implemented as Type 3 glyphs and will be rendered as images by cairo-surface.
* Merge branch 'dwrite-custom-palette' into 'master'Adrian Johnson2023-01-271-0/+1
|\ | | | | | | | | dwrite: use custom palette when rendering COLRv0 See merge request cairo/cairo!424
| * dwrite: use custom palette when rendering COLRv0Adrian Johnson2023-01-261-0/+1
| |
* | Add new cairo_user_scaled_font_get_foreground_source() functionAdrian Johnson2023-01-261-2/+3
|/ | | | | | | | | | | | The previous approach using foreground colors in user fonts does not work for gradients since the foreground color is not available at the time of recording. Add a new function cairo_user_scaled_font_get_foreground_source() that can be called by the color render function to retrieve the foreground pattern. Calling this function signals to cairo that the foreground color is used. In this case cairo will call the render function whenever the foreground color has changed.
* Fix shared use of recording surface with paginated targetsAdrian Johnson2023-01-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* Integrate COLR v1 renderer with cairo-ft-font.cAdrian Johnson2023-01-081-0/+5
|
* Fix mingw build failure when SVG fonts enabledAdrian Johnson2023-01-031-0/+7
| | | | | Add missing strndup() function. Copied the strndup() implementation from util/cairo-missing/strndup.c plus a bug fix.
* Add some missing slim_hidden entriesAdrian Johnson2022-12-281-38/+63
|
* Fix Win64 compile warningAdrian Johnson2022-04-191-1/+1
|
* Allow the C++ code in dwrite-font to use the debug functionsAdrian Johnson2022-04-191-1/+2
|
* cairoint.h: update some commentsAdrian Johnson2022-04-191-14/+25
|
* Replace use of ctype functions with internal version where only ASCII chars ↵Adrian Johnson2022-04-091-27/+1
| | | | | | | | | are used In !309 Taylor R Campbell found a number of instances of ctype incorrectly passed a signed char. In many cases, where only ASCII characters are used, the code should have been using the cairo version of the ctype function to avoid locale issues.
* Fix typos in doxygen and source commentsluz paz2022-03-281-1/+1
|
* Fix dwrite toy fontsAdrian Johnson2022-02-271-1/+13
|
* tanis: Remove cairo-coglEmmanuele Bassi2022-02-251-5/+0
| | | | Cogl's upstream is unmaintained, and has been for the past 6 years.
* Remove cairo-drmEmmanuele Bassi2022-02-251-7/+0
| | | | | The DRM backend has always been a science experiment, but now it hasn't been built in more than 10 years, and it's completely broken.
* removed redundant casts in cairoint.hAyman El Didi2022-02-191-6/+6
| | | | In a couple of instances, ints are being casted to int before use.
* Fix a doc commentUli Schlachter2021-11-021-1/+1
| | | | | | | | | | | | This commit fixes the following warning from our check-def.sh: PASS: check-def.sh Checking documentation for incorrect syntax ./cairoint.h (523): ERROR: Get invalid doc id (should be 'cairo_...:') ./cairoint.h (534): ERROR: Get bad line: ' */' ./cairoint.h (534): ERROR: Get documentation comment not closed with **/ Signed-off-by: Uli Schlachter <psychon@znc.in>
* Support color fonts that use the foreground colorAdrian Johnson2021-08-281-2/+18
| | | | | | | | | | | | | COLR fonts can have a layer with the same color as the current text color. This change passes the current color (if solid) through to the font backend where it can be used to render color fonts. scaled_glyph_lookup checks if the foreground color has changed (for glyph that require it) and requests a new color surface if required. This also fixes a bug where scaled_glyph_lookup would always request a color surface for glyphs for glyphs in color fonts that do not have color.
* Merge branch 'HairlineStroke' into 'master'Adrian Johnson2021-08-151-0/+2
|\ | | | | | | | | Added hairline support to cairo See merge request cairo/cairo!21
| * Added hairline support to cairoRick Yorgason2021-08-151-0/+2
| |
* | Add color user-font supportAdrian Johnson2021-08-141-0/+1
|/ | | | | Adds new API cairo_user_font_face_set_render_color_glyph_func() to set a color glyph renderer.
* Use uintptr_t for all casts between pointer and integerAdrian Johnson2021-07-251-3/+3
| | | | | | | | | | | | 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
* Always define _cairo_utf8_to_utf16 on WindowsPeter Wang2021-07-231-1/+1
| | | | | | | _cairo_utf8_to_utf16 is used by _cairo_fopen on Windows so must be defined even if Win32 fonts or other features are disabled. Fixes #381
* Remove all gstate from _cairo_surface_tagAdrian Johnson2021-07-181-6/+1
| | | | | The gstate is not required and was causing some tag operations to be ignored.
* Create cairo version of isxdigit()Adrian Johnson2021-07-181-0/+6
| | | | Fixes #335
* Drop the conditional inclusion of config.hEmmanuele Bassi2021-05-011-2/+0
| | | | | | | | | | | | We *always* generate this file, and we depend on its existence. The idea behind HAVE_CONFIG_H was being able to include random files from different projects, back in a time where "libraries" were literally just random files instead of actual shared objects. Since we're not in the '80s any more, and our build system(s) define HAVE_CONFIG_H *and* generate the config.h header file, we don't need a conditional guard around its inclusion.
* Fix undefined left-shiftsHeiko Lewin2021-03-311-1/+1
|
* image compositor: Support subpixel positioningMatthias Clasen2019-07-181-1/+4
| | | | | | | | | | | | | Support subpixel positioning with a 4x4 subpixel grid. When compositing glyphs in the image compositor, we store the subpixel phases in the high bits of the glyph index. The _cairo_scaled_glyph_index() macro has been updated to discard these bits. By storing the phases in the glyph index, the glyph cache just keeps working. When loading a glyph, the Freetype font backend shifts the outline according to the phases.
* Misc. typosluz.paz2019-01-311-1/+1
| | | | | | | Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint` Follow up of 12cb59be7da Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
* Add support for RGBA128F and RGB96F formats.Maarten Lankhorst2019-01-071-1/+1
| | | | | | | | | | | | | | IGT wants to add support for planes with a bit depth >10, which requires a higher precision format than we have currently. I'm using RGBA as format, because of its existence in OpenGL. With the new formats we can directly convert our bytes to half float, or multiply a colro vector with a matrix to go to the Y'CbCr colorspace. This requires pixman 0.36.0, so bump the version requirement. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
* Cairo trivial typosUnknown2018-04-021-1/+1
| | | | | | | | | | | | | Found using `codespell -q 3 -I cairo-whitelist.txt` whereby whitelist contained: ``` amin iff lod writen ``` Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Fix a 'memory leak' in the image compositorUli Schlachter2018-03-151-0/+3
| | | | | | | | | | | | | | There is a global pixman_glyph_cache_t instance that is initialized on first use and shows up in valgrind output as a relatively large leak (I think it was about 200 KiB). The reason for this is that this cache is not freed by cairo_debug_reset_static_data(). This commit wires up freeing the cache to cairo_debug_reset_static_data(). This cache was introduced in commit 615205cf0729 from 2012. Signed-off-by: Uli Schlachter <psychon@znc.in>
* Add a _cairo_font_options_fini functionMatthias Clasen2018-01-051-0/+3
| | | | | | The variations member of cairo_font_options_t is allocated, so we need to have a method to free it for cases where the struct is embedded in larger structs, such as cairo_ft_options_t.
* Make _intern_string_hash non-staticMatthias Clasen2017-12-191-0/+3
| | | | | We will use this function in cairo-font-options.c in the following commits.
* Use UTF-8 filenames on WindowsTom Schoonjans2017-11-261-0/+4
| | | | | | | | | | | Until now fopen was used on Windows to open files for reading and writing. This assumed however that the filename would be encoded in the current codepage, which is a major inconvenience and makes it even impossible to use filenames that use characters from more than one codepage. This patch enforces the use of UTF-8 filenames on all platforms. Based on the work of Owen Taylor (https://lists.cairographics.org/archives/cairo/2007-February/009591.html)
* pdf: fix mime-unique-id jpeg attached to recording testAdrian Johnson2017-11-091-0/+3
| | | | | | | | | | | | | | - Restructure the emit_surface code so that mime types are checked first. - Add a test parameter to emit_surface to test if the surface will be emitted as an image or recording instead checking the surface type as the attached mime may override this. - Mark surface as not clear when mime is attached to avoid optimizing away "clear" surfaces that have mime attached. - Include entire surface in analysis if mime attached (also fixes bug with calculating the extents CONTENT_COLOR surfaces)
* Factor out the ISFINITE() macroBryce Harrington2017-10-111-0/+6
|
* factor out ascii to double code in cff-subset into _cairo_strtodAdrian Johnson2017-09-221-1/+4
|
* Expose 'has color glyphs' as a scaled font propertyMatthias Clasen2017-07-291-0/+3
| | | | | | | This information will be used in subsequent commits to quickly decide that we won't try to handle glpyhs as masks. Implementing the new has_color_glyphs vfunc is optional - only backends that support color glyphs need to implement it.
* Add support for color glyphs to cairo_scaled_glyph_tMatthias Clasen2017-07-291-1/+7
| | | | | | | | | With this, glyphs can have either a surface that is expected to be used as mask, or a color_surface that should be used as source, or both. This will be used to support colored emoji glyphs that are stored as PNG images in OpenType fonts.
* subsetting: support variable fontsAdrian Johnson2017-05-281-2/+6
| | | | | If the font is a non default variant, fallback to creating a font from the outlines.
* unicode: Extract the UCS4 to UTF-16 conversion to a separate functionAndrea Canciani2017-04-251-0/+4
| | | | | Reuse the function for the UTF-8 to UTF-16 conversion, but also make it available for internal use by cairo.
* pdf: structured text and hyperlink supportAdrian Johnson2016-10-011-0/+6
|
* Add tag functions to cairo_t and cairo_surface_tAdrian Johnson2016-10-011-0/+11
| | | | | | | | The cairo_tag_begin/cairo_tag_end API is for supporting hyperlinks and creating tagged PDF files. The source, ctm, and stroke style are passed to the backend to allow these parameters to be used to specify hyperlink border attributes.
* Fix PS record-neg-extents test failureAdrian Johnson2016-06-051-0/+3
|