| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #508
|
|\
| |
| |
| |
| | |
Remove XML surface
See merge request cairo/cairo!446
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
Valgrind is not happy with the memcmp() to compare font options and it
won't work correctly with variations and custom_palette.
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
dwrite: use custom palette when rendering COLRv0
See merge request cairo/cairo!424
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
|
|
|
|
| |
Add missing strndup() function. Copied the strndup() implementation
from util/cairo-missing/strndup.c plus a bug fix.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Cogl's upstream is unmaintained, and has been for the past 6 years.
|
|
|
|
|
| |
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.
|
|
|
|
| |
In a couple of instances, ints are being casted to int before use.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
Added hairline support to cairo
See merge request cairo/cairo!21
|
| | |
|
|/
|
|
|
| |
Adds new API cairo_user_font_face_set_render_color_glyph_func()
to set a color glyph renderer.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
_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
|
|
|
|
|
| |
The gstate is not required and was causing some tag operations to be
ignored.
|
|
|
|
| |
Fixes #335
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Found using `codespell -q 3 -I cairo-whitelist.txt`
whereby whitelist contained:
```
amin
iff
lod
writen
```
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
We will use this function in cairo-font-options.c in the following
commits.
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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)
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
If the font is a non default variant, fallback to creating a font from
the outlines.
|
|
|
|
|
| |
Reuse the function for the UTF-8 to UTF-16 conversion, but also make
it available for internal use by cairo.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|