Commit graph

12658 commits

Author SHA1 Message Date
Fujii Hironori
adcd1e7325 DWrite: glyph surfaces should take subpixel positions into account
Shift the glyph position by phases taken
by _cairo_scaled_glyph_xphase and _cairo_scaled_glyph_yphase.

Fixes #597
2023-02-10 10:05:57 +09:00
Adrian Johnson
876ee0bb49 Merge branch 'dwrite-argb-glyph-mask' into 'master'
DWrite: Don't convert subpixel antialiasing to grayscale

See merge request cairo/cairo!453
2023-02-09 20:47:44 +00:00
Fujii Hironori
1d8032c406 DWrite: Don't convert subpixel antialiasing to grayscale
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.
2023-02-09 13:19:36 +09:00
Adrian Johnson
cae2376dd0 Merge branch 'doc-fixes' into 'master'
More random doc fixes

See merge request cairo/cairo!437
2023-02-08 09:53:29 +00:00
Adrian Johnson
a23af71c9d Merge branch 'remove-unused-tee-function' into 'master'
Remove unused _cairo_tee_surface_find_match

See merge request cairo/cairo!447
2023-02-08 09:48:29 +00:00
Adrian Johnson
fe7f1d8cb4 Merge branch 'warnings' into 'master'
Fix some compiler warnings

See merge request cairo/cairo!427
2023-02-08 09:47:42 +00:00
Adrian Johnson
f706ad5aa3 Merge branch 'bug-611-glyph-path' into 'master'
DWrite: More accurate glyph paths for small fonts

Closes #611

See merge request cairo/cairo!451
2023-02-07 21:21:19 +00:00
Fujii Hironori
db4c941c34 DWrite: More accurate glyph paths for small fonts
Applying a transformation matrix to a glyph path after converting
floats to fixed point numbers caused caluculation errors. Apply the
transform before the conversion.

Fixes cairo/cairo#611
2023-02-08 05:41:07 +09:00
Emmanuele Bassi
7f334e0479 Merge branch 'fix-error-handling-docs' into 'master'
Docs: Remove out of date remarks

See merge request cairo/cairo!450
2023-02-07 11:20:56 +00:00
Adrian Johnson
5ede164a61 doc: remove out of date remarks 2023-02-07 21:10:28 +10:30
Khaled Hosny
59c195dc82 Fix -Wlogical-not-parentheses
The code is doing "if (!double_buf_equal () != 0)" which seems to be a
convoluted way to do "if (!double_buf_equal ())". Fixes:

../test/pattern-getters.c:153:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
        if (!double_buf_equal (ctx, new_buf, expected_values,
            ^
../test/pattern-getters.c:153:6: note: add parentheses after the '!' to evaluate the comparison first
        if (!double_buf_equal (ctx, new_buf, expected_values,
            ^
             (
../test/pattern-getters.c:153:6: note: add parentheses around left hand side expression to silence this warning
        if (!double_buf_equal (ctx, new_buf, expected_values,
            ^
            (
2023-02-06 11:39:08 +02:00
Khaled Hosny
c6a27dc28b Fix -Wuninitialized
../perf/cairo-perf-chart.c:232:4: warning: variable 'sum' is uninitialized when used here [-Wuninitialized]
                        sum += v/100;
                        ^~~
../perf/cairo-perf-chart.c:142:43: note: initialize the variable 'sum' to silence this warning
    double slow_sum = 0, fast_sum = 0, sum;
                                          ^
                                           = 0.0
2023-02-06 11:39:08 +02:00
Khaled Hosny
b588a43fcd Fix -Wunused-variable
../src/cairo-quartz-image-surface.c:149:24: warning: unused variable 'size' [-Wunused-variable]
    const unsigned int size = surface->imageSurface->height * surface->imageSurface->stride;
2023-02-06 11:39:08 +02:00
Khaled Hosny
288843ef5d Fix -Wsometimes-uninitialized warning
../src/cairo-pdf-surface.c:2505:9: warning: variable 'status' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
    if (surface->base.status != CAIRO_STATUS_SUCCESS)
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/cairo-pdf-surface.c:2573:9: note: uninitialized use occurs here
    if (status == CAIRO_STATUS_SUCCESS)
        ^~~~~~
../src/cairo-pdf-surface.c:2505:5: note: remove the 'if' if its condition is always false
    if (surface->base.status != CAIRO_STATUS_SUCCESS)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/cairo-pdf-surface.c:2497:5: note: variable 'status' is declared here
    cairo_status_t status, status2;
    ^
2023-02-06 11:39:08 +02:00
Uli Schlachter
6f205ed28f Remove unused _cairo_tee_surface_find_match
A little history digging shows that we only ever had one caller of
_cairo_tee_surface_find_match. Commit 658cdc7c9a "Introduce
cairo_tee_surface_t" added this code to _cairo_surface_clone_similar():

    if (src->type == CAIRO_SURFACE_TYPE_TEE) {
       cairo_surface_t *match;

       match = _cairo_tee_surface_find_match (src,
                                              surface->backend,
                                              content);
       if (match != NULL)
           src = match;
    }

Then, two years later in 2011, commit af9fbd176b "Introduce a new compositor
architecture" removed _cairo_surface_clone_similar() and thus this code became
unused.

This commit drops this unused code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2023-02-05 16:15:25 +01:00
Uli Schlachter
23e2718bd7 Merge branch 'unused-code' into 'master'
Drop some unused or dead code

See merge request cairo/cairo!443
2023-02-05 15:00:05 +00:00
Khaled Hosny
7980301fe4 Remove dead code
This is no-op as the functions always return TRUE and the code is never
executed.
2023-02-04 10:59:41 +02:00
Khaled Hosny
c1564baf61 Fix -Wunused-but-set-parameter
../test/cairo-test-runner.c:730:48: warning: parameter 'str' set but not used [-Wunused-but-set-parameter]
_has_required_ghostscript_version (const char *str)
2023-02-04 10:58:13 +02:00
Khaled Hosny
c2ce4d421d Fix -Wparentheses-equality warnings
warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
2023-02-04 10:58:13 +02:00
Adrian Johnson
338eca4342 Merge branch 'issue-634' into 'master'
tee: Fix cairo wrapper functions

Closes #634

See merge request cairo/cairo!442
2023-02-03 20:47:16 +00:00
Emmanuele Bassi
4b1e075171 util: Fix compiler warnings in cairo-sphinx
Though I'm not sure how useful this tool is.
2023-02-03 15:45:11 +01:00
Emmanuele Bassi
5e42a5277e tee: Fix cairo wrapper functions
Follow-up to !391 to apply the same changes to the (disabled by default)
tee surface.

Fixes: #634
2023-02-03 15:40:12 +01:00
Khaled Hosny
bd608ab72c doc: fix cairo_dwrite_font_face_set_rendering_params docs
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.
2023-02-02 14:19:08 +02:00
Khaled Hosny
379cb6a672 doc: Document the deprecated status of more surface types 2023-02-02 14:13:56 +02:00
Khaled Hosny
bc0139fd1a doc: Fix external links 2023-02-02 14:13:56 +02:00
Khaled Hosny
06cda058f2 doc: Escape percent sign
Otherwise gtk-doc will eat one of them.
2023-02-02 14:13:56 +02:00
Khaled Hosny
3c6727ee5c doc: Fix internal links 2023-02-02 14:13:56 +02:00
Khaled Hosny
bc2f9b956b doc: Don’t mention non-existent cairo_stroke_to_path()
The code for it is commented out and unimplemented.
2023-02-02 14:13:56 +02:00
Khaled Hosny
086e013e06 doc: Include surface observer documentation
Mostly empty, though.
2023-02-02 14:13:56 +02:00
Khaled Hosny
f03c73b270 doc: Fix missing quartz image surface docs 2023-02-02 14:13:56 +02:00
Khaled Hosny
368ceb67b4 doc: Document CAIRO_SURFACE_TYPE_SKIA and mark it deprecated
Though the Skia code is gone, the surface type enum value is still kept
and need to be documented.
2023-02-02 14:13:56 +02:00
Khaled Hosny
500d87c90d doc: Document CAIRO_STATUS_SVG_FONT_ERROR 2023-02-02 14:13:56 +02:00
Khaled Hosny
40badda549 doc: Fix the gtk-doc syntax of internal symbols
To stop gtk-doc from listing them as undocumented.
2023-02-02 14:13:56 +02:00
Khaled Hosny
4c48d4bbb8 doc: Fix parameter name in comment 2023-02-02 14:13:56 +02:00
Khaled Hosny
eaf8859877 doc: Fix dwrite gtk-doc warnings
Don’t use gtk-doc comment syntax for regular comments.
2023-02-02 14:13:56 +02:00
Adrian Johnson
71eb6396c4 Merge branch 'bug-597' into 'master'
Win32 surface compositor should support DWrite font

Closes #597

See merge request cairo/cairo!441
2023-02-02 10:59:29 +00:00
Adrian Johnson
00453e9a7d Merge branch 'pdf-color-fonts' into 'master'
PDF Type 3 color fonts

See merge request cairo/cairo!434
2023-02-02 10:58:52 +00:00
Adrian Johnson
9be6429cbc Merge branch 'fix-test-symlink' into 'master'
meson: Replace existing link if it already exists

Closes #631

See merge request cairo/cairo!440
2023-02-02 10:57:55 +00:00
Adrian Johnson
74feff604e Merge branch 'fix-svg-render-debug' into 'master'
Fix build with -DDEBUG_SVG_RENDER

See merge request cairo/cairo!439
2023-02-02 10:57:35 +00:00
Emmanuele Bassi
260f0fd9ec Merge branch 'ebassi/snapshot-release' into 'master'
Cairo 1.17.8 snapshot

See merge request cairo/cairo!436
2023-02-02 10:24:31 +00:00
Emmanuele Bassi
b1a18123ed Post-release version bump to 1.17.9 2023-02-02 10:47:00 +01:00
Emmanuele Bassi
c3b672634f Release Cairo 1.17.8 (snapshot) 2023-02-02 08:37:29 +01:00
Emmanuele Bassi
cd988448f9 docs: Port the README to Markdown
And clean it up a little bit.
2023-02-02 08:37:29 +01:00
Emmanuele Bassi
08688d5c98 docs: Remove KNOWN_ISSUES
Cairo is perfect, and has no known issues outside of the ones that are
listed in the issue tracker.
2023-02-02 08:37:29 +01:00
Emmanuele Bassi
af5fa7973a docs: Drop the pre-1.0 porting guide
It's been nearly 20 years; time to let it go.
2023-02-02 08:37:29 +01:00
Emmanuele Bassi
98fa4be56b docs: Update the bibliography
Port to Markdown.
2023-02-02 08:37:29 +01:00
Emmanuele Bassi
d86a22db6d docs: Update the release instruction
Mainly drop the Autotools-related stuff, and use Markdown.
2023-02-02 08:37:29 +01:00
Emmanuele Bassi
d54e908c98 Move documentation files to the doc directory 2023-02-02 08:37:29 +01:00
Emmanuele Bassi
e29ede58d3 perf: Disable deprecation warnings for the perf widget
We're using an EOL version of GTK; we know we are using deprecated API.

Until somebody shows up with a replacement, or until we drop the perf
widget, we should avoid unnecessary compiler warnings.
2023-02-02 08:37:28 +01:00
Emmanuele Bassi
2be68fb4e0 build: Turn version.py into idiomatic Python
While it's possible to write C code in Python, it's better to actually
write Python code in Python.

Use regular expressions, instead of counting characters, to allow a
little bit more leeway when editing the cairo-version.h header file.

Use a context manager to handle the lifetime of a file object.

Use f-strings instead of the obsolete format() method.
2023-02-02 08:37:28 +01:00