summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ft: don't use scaled_glyph->dev_private to store dataAdrian Johnson2023-05-131-4/+5
| | | | | | It is also used by the xlib surface. Fixes #778
* Don't assume HAVE_FT_PALETTE_SELECT is defined when HAVE_FT_SVG_DOCUMENT is ↵Adrian Johnson2023-04-301-9/+6
| | | | | | defined Fixes #777
* pdf: Don't use snprintf() to print floatsAdrian Johnson2023-04-181-8/+16
| | | | It is not locale independent.
* Make cairo_tag_begin/end work correctly in groupsAdrian Johnson2023-04-1824-467/+2156
| | | | Fixes #508
* cairo-list-inline.h: fixes and documentationAdrian Johnson2023-04-162-7/+154
| | | | | | - Fix a bug in cairo_list_is_singular - Rename cairo_list_swap() to cairo_list_move_list() to better describe what it is doing.
* win32: InterlockedCompareExchange uses LONGAdrian Johnson2023-04-131-4/+4
| | | | Fixes #776
* Merge branch 'issue-643' into 'master'Adrian Johnson2023-03-071-1/+16
|\ | | | | | | | | | | | | Fix missing glyphs in ft-font Closes #643 See merge request cairo/cairo!467
| * ft: Use normal font size when detecting the formatAdrian Johnson2023-03-071-1/+16
| | | | | | | | | | | | The format may depend on the font size. Fixes #643
* | Merge branch 'unused-function' into 'master'Uli Schlachter2023-03-035-69/+0
|\ \ | | | | | | | | | | | | Fix -Wunused-function warnings See merge request cairo/cairo!449
| * | Fix -Wunused-function warningsKhaled Hosny2023-02-065-69/+0
| | |
* | | Merge branch 'ofz46165' into 'master'Uli Schlachter2023-03-031-1/+6
|\ \ \ | |_|/ |/| | | | | | | | ofz#46165 avoid a divide by zero seen fuzzing libreoffice rendering See merge request cairo/cairo!351
| * | ofz#46165 avoid a divide by zero seen fuzzing libreoffice renderingCaolán McNamara2022-08-311-1/+6
| | |
* | | Merge branch 'issue-3-win32-font-scale' into 'master'Adrian Johnson2023-03-021-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | win32 font is very small if the lfHeight of HFONT is exactly -size Closes #3 See merge request cairo/cairo!466
| * | | win32 font is very small if the lfHeight of HFONT is exactly -sizeFujii Hironori2023-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cairo_win32_font_face_create_for_hfont is reusing the HFONT object passed by an argument if possible to create a scaled font. However, the condition was wrong. It checked the font matrix scale factor is `-lfHeight`. But it should be `-lfHeight * WIN32_FONT_LOGICAL_SCALE`. Fixes cairo/cairo#3
* | | | Merge branch 'drop-xml-surface' into 'master'Emmanuele Bassi2023-03-024-1285/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | Remove XML surface See merge request cairo/cairo!446
| * | | Remove XML surfaceEmmanuele Bassi2023-02-044-1285/+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.
* | | | Open-code bbtree_del to avoid free()ing a non-allocated objectMatt Turner2023-03-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we do already in _cairo_recording_surface_finish. Otherwise, the cleanup path of _cairo_recording_surface_create_bbtree() could call free() on surface->bbtree which is not dynamically allocated. Closes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/645
* | | | DWrite: region clipping didn't work on win32 surfacesFujii Hironori2023-03-011-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following clipping text tests of win32/rgb24 target were visibly failing because clipping didn't work. * clip-text * partial-clip-text-bottom * partial-clip-text-left * partial-clip-text-right * partial-clip-text-top _cairo_win32_gdi_compositor_glyphs sets the clip. However, _cairo_dwrite_show_glyphs_on_surface unset it. Fixes cairo/cairo#641
* | | | DWrite: Support antialias and subpixel order font optionsFujii Hironori2023-02-272-15/+145
| | | | | | | | | | | | | | | | | | | | Create a new IDWriteRenderingParams object from the given font options.
* | | | Change the workaround of MinGW dwrite_3.h problemFujii Hironori2023-02-273-159/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DWRITE_COLOR_GLYPH_RUN1 struct definition of the old MinGW dwrite_3.h was invalid. To work around the problem, dw-extra.h defined the correct struct definition and all necessary API from dwrite_3.h. This approach needed to redefine all necessary API. This change added DWRITE_COLOR_GLYPH_RUN1_WORKAROUND struct and use it for IDWriteColorGlyphRunEnumerator1::GetCurrentRun.
* | | | Merge branch 'issue-569-dwrite-inflate-glyph-bounds' into 'master'Adrian Johnson2023-02-201-4/+9
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DWrite: Inflate glyph bounds 1px vertically too Closes #569 See merge request cairo/cairo!461
| * | | | DWrite: Inflate glyph bounds 1px vertically tooFujii Hironori2023-02-201-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most top and bottom lines of glyphs were clipped in some fonts and conditions. The glyph bounds were inflated 1px horizontally. It should inflate vertically too. Fixes cairo/cairo#569
* | | | | Merge branch 'fix-doc-for-cairo_matrix_transform_distance' into 'master'Adrian Johnson2023-02-201-7/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Fix cairo_matrix_transform_distance documentation See merge request cairo/cairo!462
| * | | | Fix cairo_matrix_transform_distance documentationFujii Hironori2023-02-181-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use dx and dy instead of dx1 and dy1 to match with the arguments * Use dx_new and dy_new instead of dx2 and dy2 to match with other parts of the documentation * Use xx, yx, xy, yy instead of a, b, c, d to match with other parts of the documentation * Remove the last two sentences that doesn't make sense
* | | | | [quartz]Conditionally Use Main Display ColorSpace instead of ↵John Ralls2023-02-173-52/+146
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kCGColorSpaceDefaultRGB. The default RGB colorspace must be converted to the GPU's colorspace using CGColorTransformConvertUsingCMSConverter. Profiling has shown this function to consume as much as 48% of a redraw cycle in gdk-quartz. There seems to be no named colorspace that matches the one stored on the display, so we use the one associated with the main display. This has some risks for users with multiple monitors but in testing with my own two-monitor setup, one of which is HDR and the other not, the colorspace was the same for both. This is applied to quartz surfaces created with cairo_quartz_surface_create(); surfaces created with cairo_quartz_surface_create_for_cg_context will inherit the colorspace from the context. In order to generate PNGs that look right I've converted the existing debugging functions for writing a quartz surface to png into private functions and wired cairo-boilerplate-quartz to use them. Using the generic cairo routine produced washed-out PNGs. Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/330
* | | | Merge branch 'quartz-image-surface' into 'master'Uli Schlachter2023-02-173-278/+150
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | [quartz] Cleanup and make better use of cairo_quartz_image_surface_t. See merge request cairo/cairo!317
| * | | | [quartz] Pretty up the surface-type and zero-size tests.John Ralls2023-02-143-22/+33
| | | | |
| * | | | [quartz] Cleanup and make better use of cairo_quartz_image_surface_t.John Ralls2023-02-143-274/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a CGBitmapContext mapping the underlying image surface's data instead of maintaining a CGImage. Generalize the quartz surface snapshot mechanism to work with both cairo_quartz_surface_t and cairo_quartz_image_surface_t and to use the latter to get a CGContext around non-quartz surfaces. Use this snapshot machanism to get a CGImageRef when needed from a cairo_quartz_image_surface_t.
* | | | | Merge branch 'issue-641-glyph-bounds' into 'master'Adrian Johnson2023-02-161-99/+31
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DWrite: clipped glyphs in win32 compositor Closes #641 See merge request cairo/cairo!459
| * | | | | DWrite: clipped glyphs in win32 compositorFujii Hironori2023-02-141-99/+31
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The win32 compositor is using _cairo_dwrite_show_glyphs_on_surface for DWrite. It was assuming that a glyph was painted inside 3x3 of the em square. It should take the actual glyph bounding box by using GetAlphaTextureBounds. Fixes cairo/cairo#641
* | | | | Merge branch 'dwrite-glyph-phase' into 'master'Adrian Johnson2023-02-161-16/+6
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | DWrite: glyph surfaces should take subpixel positions into account Closes #597 See merge request cairo/cairo!456
| * | | | DWrite: glyph surfaces should take subpixel positions into accountFujii Hironori2023-02-101-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shift the glyph position by phases taken by _cairo_scaled_glyph_xphase and _cairo_scaled_glyph_yphase. Fixes #597
* | | | | Merge branch 'ft-use-outline-glyph-for-path' into 'master'Adrian Johnson2023-02-111-40/+13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | FT: Always use the outline glyph to get the path See merge request cairo/cairo!455
| * | | | | FT: Always use the outline glyph to get the pathAdrian Johnson2023-02-091-40/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to extract the path from a color recording does not work in all cases such as paths in groups.
* | | | | | Merge branch 'fix-valgrind-errors' into 'master'Adrian Johnson2023-02-114-2/+45
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | Fix some problems found by valgrind See merge request cairo/cairo!452
| * | | | | Implement a font options compare function and use it in gstateAdrian Johnson2023-02-083-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Valgrind is not happy with the memcmp() to compare font options and it won't work correctly with variations and custom_palette.
| * | | | | truetype: revert use of _cairo_strndupAdrian Johnson2023-02-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3d102f25 changed the malloc/memcpy to _cairo_strndup but it won't work in this case as the string may be UTF-16.
* | | | | | DWrite: Don't convert subpixel antialiasing to grayscaleFujii Hironori2023-02-093-41/+9
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | Reuse the win32 font code to create a glyph mask for a dwrite font. Renamed a function _compute_mask in cairo-win32-font.c to _cairo_compute_glyph_mask.
* | | | | Merge branch 'doc-fixes' into 'master'Adrian Johnson2023-02-0813-48/+87
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | More random doc fixes See merge request cairo/cairo!437
| * | | | | doc: fix cairo_dwrite_font_face_set_rendering_params docsKhaled Hosny2023-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gtk-doc wants the header and code parameter names to match. src/win32/cairo-dwrite-font.cpp:1484: warning: Parameter description for cairo_dwrite_font_face_set_rendering_params::params is not used from source code comment block. src/win32/cairo-dwrite-font.cpp:1484: warning: Parameter description for cairo_dwrite_font_face_set_rendering_params::param is missing in source code comment block.
| * | | | | doc: Document the deprecated status of more surface typesKhaled Hosny2023-02-021-9/+19
| | | | | |
| * | | | | doc: Fix external linksKhaled Hosny2023-02-021-3/+3
| | | | | |
| * | | | | doc: Escape percent signKhaled Hosny2023-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise gtk-doc will eat one of them.
| * | | | | doc: Fix internal linksKhaled Hosny2023-02-021-2/+2
| | | | | |
| * | | | | doc: Don’t mention non-existent cairo_stroke_to_path()Khaled Hosny2023-02-021-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | The code for it is commented out and unimplemented.
| * | | | | doc: Include surface observer documentationKhaled Hosny2023-02-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Mostly empty, though.
| * | | | | doc: Fix missing quartz image surface docsKhaled Hosny2023-02-021-4/+16
| | | | | |
| * | | | | doc: Document CAIRO_SURFACE_TYPE_SKIA and mark it deprecatedKhaled Hosny2023-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Though the Skia code is gone, the surface type enum value is still kept and need to be documented.
| * | | | | doc: Document CAIRO_STATUS_SVG_FONT_ERRORKhaled Hosny2023-02-021-0/+1
| | | | | |
| * | | | | doc: Fix the gtk-doc syntax of internal symbolsKhaled Hosny2023-02-024-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | To stop gtk-doc from listing them as undocumented.