Khaled Hosny
7f7719fe4e
doc: Further fix API indices
...
Actually include only the relevant symbols.
2023-01-28 18:03:00 +02:00
Adrian Johnson
b67afda591
Merge branch 'fix-ft-foreground' into 'master'
...
Fix foreground colors in FT/SVG/COLRv1
See merge request cairo/cairo!430
2023-01-28 04:54:26 +00:00
Adrian Johnson
ffabca7924
Merge branch 'calloc' into 'master'
...
[malloc-stats] Measure calloc
See merge request cairo/cairo!429
2023-01-27 20:50:31 +00:00
Adrian Johnson
407bb0a478
Merge branch 'dwrite-custom-palette' into 'master'
...
dwrite: use custom palette when rendering COLRv0
See merge request cairo/cairo!424
2023-01-27 10:44:31 +00:00
Adrian Johnson
22d0cd1ec3
Merge branch 'doc-fixes' into 'master'
...
Some documentation fixes
See merge request cairo/cairo!428
2023-01-27 10:26:44 +00:00
Adrian Johnson
119ce21b2c
Merge branch 'dwrite-docs' into 'master'
...
Simplify generating dwrite-fonts docs
See merge request cairo/cairo!426
2023-01-27 10:16:55 +00:00
Adrian Johnson
bdf97dd2a1
Rename is_userfont_foreground to is_foreground_marker
...
as it is used by FT as well as user fonts.
2023-01-27 20:22:19 +10:30
Adrian Johnson
9e59808ecb
svg: test foreground colors
...
Convert the ft-svg-render-palette test to a color test that test
both palettes and foreground colors.
2023-01-27 20:22:18 +10:30
Adrian Johnson
c8695f0503
Foreground color fixes for ft, svg, colrv1
2023-01-27 20:22:18 +10:30
Behdad Esfahbod
25b6775cc6
[malloc-stats] Measure calloc
2023-01-26 14:20:12 -07:00
Khaled Hosny
f05f2b3955
Fix gtk-doc syntax
2023-01-26 18:27:56 +02:00
Adrian Johnson
055ca7fb09
Merge branch 'fix-user-fonts-foreground' into 'master'
...
Add new cairo_user_scaled_font_get_foreground_source() function
See merge request cairo/cairo!422
2023-01-26 11:55:40 +00:00
Khaled Hosny
3cea38c02c
doc: fix generation of API indices
...
The index id is expected to be "api-index-*" not just "index-*", and for
some reason newer versions of gtk-doc don’t like these "role" attributes
and will not generate the index if they are present. Also add missing
indices for 1.0 and 1.18.
2023-01-26 13:39:36 +02:00
Khaled Hosny
0cc13eb894
Simplify generating dwrite-fonts docs
...
Tell gtk-doc to scan .cpp files instead of making a proxy .c file.
2023-01-26 13:08:45 +02:00
Adrian Johnson
f35f757e8f
Update user font tests to test foreground colors
2023-01-26 19:49:06 +10:30
Adrian Johnson
e93d175aac
Add new cairo_user_scaled_font_get_foreground_source() function
...
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.
2023-01-26 19:49:06 +10:30
Adrian Johnson
75d876ee29
dwrite: use custom palette when rendering COLRv0
2023-01-26 13:19:53 +10:30
Adrian Johnson
0151a67e33
Merge branch 'svg-font-palette' into 'master'
...
Add svg font test for custom palette colors
See merge request cairo/cairo!418
2023-01-26 01:12:20 +00:00
Adrian Johnson
9ed9cfcf36
Merge branch 'fix-clear-color-glyphs' into 'master'
...
surface: Don't optimize away color glyphs
See merge request cairo/cairo!419
2023-01-26 01:07:44 +00:00
Behdad Esfahbod
2490c8bc0e
Merge branch 'colrv1-fix-crash' into 'master'
...
[colrv1] Fix crash in get_palette_color
See merge request cairo/cairo!421
2023-01-24 00:27:24 +00:00
Behdad Esfahbod
3b807c1d7e
[colrv1] Fix crash in get_palette_color
...
is_foreground_color can be NULL.
2023-01-23 16:50:48 -07:00
Matthias Clasen
ad667d4afd
surface: Don't optimize away color glyphs
...
The surface code was optimizing away show_text_glyphs
based on the operator when the source pattern is clear.
But if we are rendering color glyphs, that is not
correct since we are using the glyphs as source.
2023-01-21 10:47:54 -05:00
Adrian Johnson
ea51a5d66a
Merge branch 'fix-svg-crash' into 'master'
...
Fix svg renderer crash
See merge request cairo/cairo!416
2023-01-21 08:39:29 +00:00
Adrian Johnson
b68583ee54
Add test for SVG font palettes
2023-01-21 17:46:18 +10:30
Adrian Johnson
3cc9e198fd
Silence make-cairo-def.sh output
...
This removes the following output:
Generating src/cairo.def
<stdin>:6:9: warning: #pragma once in main file
<stdin>:4377:9: warning: #pragma once in main file
2023-01-21 17:19:17 +10:30
Adrian Johnson
7072f62611
Merge branch 'custom-color-palette-2' into 'master'
...
Add custom palettes for COLRv1 and SVG fonts
See merge request cairo/cairo!417
2023-01-21 02:13:06 +00:00
Matthias Clasen
733e298bea
Reshuffle code for clarity
...
Only loop over custom colors if we got
a palette selected successfully.
2023-01-20 20:39:23 -05:00
Matthias Clasen
be1d41f001
Use the custom palette for COLv1 renderer
...
When the font options contain a custom palette,
overwrite the palette we got from freetype with
the custom entries.
2023-01-20 15:20:22 -05:00
Matthias Clasen
67eeed44cd
Add a custom palette to font options
...
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.
2023-01-20 15:20:22 -05:00
Matthias Clasen
2e4afeb4bc
cairo-ft: Pass the palette to the COLRv1 renderer
...
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.
2023-01-20 14:58:27 -05:00
Matthias Clasen
8992e26f07
cairo-ft: Fix palette handling
...
We were returning the number of palettes where
the number of palette entries was expected,
leading to array overruns. Oops
2023-01-20 14:55:52 -05:00
Adrian Johnson
ae256003fb
svg-font: fix parse bug on empty tags
2023-01-20 20:39:29 +10:30
Adrian Johnson
cbcf962da2
svg-font: return SVG_FONT_ERROR on error
2023-01-20 20:37:45 +10:30
Behdad Esfahbod
45a1317aa4
Merge branch 'scaled-font-options' into 'master'
...
[scaled-font] Clean up font-options before copy
See merge request cairo/cairo!415
2023-01-19 21:19:41 +00:00
Behdad Esfahbod
8fbfb7f377
[scaled-font] Clean up font-options before copy
2023-01-19 13:42:23 -07:00
Uli Schlachter
7b1de369dd
Merge branch 'gstate-font-options' into 'master'
...
[gstate] Fix cairo_font_options_t memory management
See merge request cairo/cairo!414
2023-01-19 16:10:03 +00:00
Behdad Esfahbod
a32ddef9d9
[gstate] Fix cairo_font_options_t memory management
...
cairo_font_options_t has grown to have malloc'ed memory,
so the previous code was leaking, and double-freeing.
2023-01-18 23:19:12 -07:00
Adrian Johnson
2c557d7cea
Merge branch 'colrv1-stack-variable' into 'master'
...
[COLRv1] Allocate context variable on the stack
See merge request cairo/cairo!410
2023-01-17 20:26:50 +00:00
Adrian Johnson
f133b4be13
Merge branch 'optimize-paint-composite' into 'master'
...
[COLRv1] Optimize paint-composite
See merge request cairo/cairo!411
2023-01-17 20:25:07 +00:00
Adrian Johnson
68ee427b66
Merge branch 'colr-foreground-alpha' into 'master'
...
[COLRv1] Apply alpha to foreground color
See merge request cairo/cairo!409
2023-01-17 20:24:16 +00:00
Adrian Johnson
1c544160b9
Merge branch 'colrv1-fixes' into 'master'
...
COLR v1 font render fixes
Closes #624 and #623
See merge request cairo/cairo!407
2023-01-17 20:22:50 +00:00
Emmanuele Bassi
ec107d5698
Merge branch 'fix-device-scaling-doc-comments' into 'master'
...
Fix docs for cairo_surface_[sg]et_device_scale
Closes #616
See merge request cairo/cairo!396
2023-01-17 15:19:52 +00:00
Behdad Esfahbod
0f8bd754ae
[COLRv1] Optimize paint-composite
...
See https://github.com/googlefonts/colr-gradients-spec/issues/369
2023-01-17 08:10:36 -07:00
Behdad Esfahbod
9e6c1e479f
[COLRv1] Allocate context variable on the stack
2023-01-17 07:58:38 -07:00
Behdad Esfahbod
ef9ea14352
[COLRv1] Apply alpha to foreground color
2023-01-17 06:48:28 -07:00
Adrian Johnson
f642714473
colrv1: Fix palette alpha
...
Fixes #624
2023-01-17 23:08:22 +10:30
Adrian Johnson
4da39d34a7
colrv1: Don't use EM size when hint metrics is off
...
Fixes #623
2023-01-17 23:00:37 +10:30
Adrian Johnson
ded2092e20
Ensure outline font is used when CAIRO_COLOR_MODE_NO_COLOR is set
2023-01-17 22:57:15 +10:30
Adrian Johnson
745c3717aa
Merge branch 'fix-shared-recording-surface' into 'master'
...
Fix shared use of recording surfaces
See merge request cairo/cairo!391
2023-01-16 08:59:32 +00:00
Adrian Johnson
6abc8076c9
Merge branch 'meson-and-doc-fixes' into 'master'
...
Meson and documentation fixes
See merge request cairo/cairo!406
2023-01-16 08:57:45 +00:00