Commit graph

11645 commits

Author SHA1 Message Date
Matthias Clasen
e4a79db010 xlib compositor: Support subpixel positioning
As for the image compository, support a 4x4
subpixel grid.
2019-07-18 14:38:47 -07:00
Matthias Clasen
6fd4222ab0 Add a testcase for subpixel positioning
With the image compositor, you can see different
phases. The XLib compositor always uses the same
glyph rendering.
2019-07-18 14:38:47 -07:00
Matthias Clasen
ea9329215d image compositor: Support subpixel positioning
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.
2019-07-18 14:38:47 -07:00
Florian Müllner
bab53d91a8 ft-font: Fix color font support
FT_PIXEL_MODE_BGRA is an enum member, not a define, so it always appears
as 0 in the preprocessor conditions added in commit c0ed8ce1a1.

There is an existing define for color font support, use that instead.
2019-05-30 17:38:59 +00:00
Antony Lee
dfe3aa6d88 Fix off-by-one bug in tor22-scan-converter.
This makes the implementation in tor22-scan-converter match the one in
tor-scan-converter.
2019-05-10 15:02:54 +00:00
Massimo Valentini
82a2477a4a add a test to exercise tor22 spans allocation code path 2019-05-10 15:02:54 +00:00
Uli Schlachter
269522fbe9 .gitlab-ci.yml: Temporarily switch to Fedora rawhide
Since commit a34cb719cd, we need pixman >= 0.36, which is not yet
in the latest Fedora. Thus, this switches to Fedora rawhide to make
things work again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2019-03-25 17:02:13 +00:00
Vasilij Schneidermann
81102cc214 Disable sphinx build if PNG support is disabled 2019-03-14 17:42:28 +00:00
Federico Mena Quintero
250ae25b0a Don't use deprecated rsvg_set_default_dpi()
Use rsvg_handle_set_dpi() instead.
2019-03-12 10:20:26 -06:00
Bryce Harrington
2d1a137f3d Revert "clip-boxes: Drop too-early return"
This reverts commit cb871c6c69.

The original code is badly, but removing the early return leads to
crashes.  This code will need a lot more attention to get right, for now
at least go back to the original behavior.

Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/358#note_125270
2019-03-03 00:01:34 -08:00
Bryce Harrington
9752636bad gitignore: gtk-doc.m4
This file is generated by the dist release scripts.
2019-02-01 09:59:05 -08:00
Bryce Harrington
4c5c48ebaa surface: Fix spelling fix 2019-02-01 09:11:46 -08:00
Bryce Harrington
0f6ca43f5e cairo: Fix Since number for new color formats 2019-02-01 08:15:42 -08:00
Adrian Johnson
2a21ed0293 tags: Don't ignore tag on empty pages
Issue 357
2019-02-01 19:47:00 +10:30
Bryce Harrington
ef99c3bf30 Start 1.17.2+1 development 2019-01-31 19:49:57 -08:00
Bryce Harrington
d67be70805 Release 1.17.2 2019-01-31 19:33:41 -08:00
luz.paz
6d93bddbd6 Misc. typos
Found via `codespell -i 3 -w -I ../cairo-word-whitelist.txt -L tim,ned,uint`
Follow up of 12cb59be7d

Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-31 17:37:15 -08:00
Bryce Harrington
cb871c6c69 clip-boxes: Drop too-early return
The indentation of this line suggests it is a typo.  In any case it
causes the function to unconditionally return immediately, thereby
shortcircuiting it entirely, which does not appear to be the intended
behavior.

Fixes: https://gitlab.com/cairo/cairo/issues/2
2019-01-31 17:24:05 -08:00
Adrian Johnson
ef8c379e0f scaled-subsets: always include glyphs maps to character 0
Issue 354
2019-01-16 20:46:42 +10:30
Uli Schlachter
6edf572ebb Merge branch 'ft-crash' of gitlab.freedesktop.org:carlosgc/cairo 2019-01-09 07:50:12 +01:00
Maarten Lankhorst
d061570a70 png: Add support for 16 bpc png reading as floating point format
Similar to writing png, don't squash 16 bpc to 8 bpc and create
a float surface to contain the image.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:14:16 -08:00
Maarten Lankhorst
1df0a68460 png: Add support for writing new floating point formats as 16 bpc png.
_cairo_image_surface_coerce will round down the image to a lower
bpp when using one of the floating point formats, so don't coerce those.
This makes the code actually work for those formats.

Because a float takes more storage than u16, we have to convert float
to u16 before calling png_write_image, because png_write
doesn't give us back the original row data, but an in-place copy.

With these changes we can dump floating point files with the highest
possible accuracy, with floats clamped between 0 and 1.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:14:13 -08:00
Maarten Lankhorst
a34cb719cd Add support for RGBA128F and RGB96F formats.
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>
2019-01-07 19:10:44 -08:00
Maarten Lankhorst
87c1c19197 cairo-trace: Simplify bigendian case in emit_image.
All the cases are the same, except len is different.
Use the already calculated len parameter to handle all
cases except RGB24 the same.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Suggested-by: Bryce Harrington <bryce@bryceharrington.org>
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2019-01-07 19:10:30 -08:00
Adrian Johnson
3a0670e03c tag_attributes: Allow decimal points in non decimal point locales
Issue #347
2018-12-31 12:45:06 +10:30
Uli Schlachter
4804d073e6 Remove all traces of NUM_THREADS
The code that looked at CAIRO_TEST_NUM_THREADS was removed seven years
ago in commit 6ef9779a6f, because it was dead code. I have not
managed to figure out how long exactly this code was dead already.

This commit removes the last traces of NUM_THREADS.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-12-16 09:53:07 +01:00
Uli Schlachter
c62238a1da .gitlab-ci.yml: Do a verbose build
With VERBOSE=1, a lot more stuff is printed while make runs. Perhaps
most interestingly, this prints the output of a failed test after the
test failed. Thus, this gives us the output of the test suite.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-12-16 09:53:07 +01:00
suzuki toshiya
c0ed8ce1a1 [cairo-ft-font.c] conditionalize the changes by 3ec4aa24 on 2018-07-16 for legacy FreeType2 without color font feature 2018-12-13 14:36:56 +09:00
Adrian Johnson
3c4570f8f4 ps: fix invalid matrix in eps embedding 2018-12-02 21:30:51 +10:30
Carlos Garcia Campos
90e85c2493 ft: Use FT_Done_MM_Var instead of free when available in cairo_ft_apply_variations
Fixes a crash when using freetype >= 2.9
2018-11-19 12:35:33 +01:00
Jordan Petridis
01788f5edb CI: Fix Docker image uris
Images where migrated a couple months ago to the
GNOME gitlab instance.
2018-11-11 12:59:39 +00:00
Adrian Johnson
4c8813f0ea pdf: add missing flush
Issue #342
2018-10-25 18:46:17 +10:30
Adrian Johnson
4db835c5b5 doc: fix link tags code example
The old code did not work.
2018-10-24 13:43:05 +10:30
Bryce Harrington
c66f017aa3 RELEASING: Bugzilla no longer needs updated 2018-10-22 15:47:03 -07:00
Adrian Johnson
717f0e0a40 type1: fallback if the font matrix is not a uniform scale
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1790242
2018-10-21 13:42:24 +10:30
Bryce Harrington
ec70bde74a Bump version for 1.17.1 2018-10-19 13:43:54 -07:00
Bryce Harrington
3ad43122b2 1.16.0 release
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-10-19 13:23:16 -07:00
Bryce Harrington
6059f5f260 test: Free resources in pdf2png
Patch proposed by Bofa.

Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/317
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2018-10-17 17:53:12 -07:00
Bryce Harrington
3a03c1ba4b win32: Fix regression with text containing space character
Converting a series of glyphs to a path triggers an out of memory error
if there is a space glyph (bytesGlyph==0).  The regression was
introduced by commit 19982393 in cairo-win32-font.c:107.

The behavior of malloc(0) is not well defined - it can return NULL on
some platforms, or an arbitrary (non-allocated) pointer on other
platforms.  Commit 19982393 introduced sanity by enforcing that NULL is
always returned in this situation, which inappropriately triggers the
OOM check in _cairo_win32_scaled_font_init_glyph_path().  Instead,
special case the handling for bytesGlyph==0.

Patch authored by Uli Schlachter, based on fix proposed by lb90.

Fixes:  https://gitlab.freedesktop.org/cairo/cairo/issues/339
Reference:  https://gitlab.gnome.org/GNOME/pango/issues/323
Reviewed-by: Bryce Harrington <bryce@bryceharrington.org>
2018-10-17 17:32:10 -07:00
Bryce Harrington
7786b8fe4e Drop skia backend
Commit 38806bc3 already disabled the backend from use, now drop the
code.
2018-10-17 17:21:03 -07:00
Paul Menzel
f246a2144f Use HTTPS URLs for gnome.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*gnome.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}gnome\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:20 -07:00
Paul Menzel
1c9201721d Use HTTPS URLs for freedesktop.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*freedesktop.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}freedesktop\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:07 -07:00
Paul Menzel
15ad6ca3e1 Use HTTPS URLs for cairographics.org domains
Run the command below suggested by geirha in ##sed@irc.freenode.net.

    git grep -l 'http://.*cairographics.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}cairographics\.org\)|https\1|g'

Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
2018-10-16 10:03:01 -07:00
Bryce Harrington
bf597b8928 Revert "Correctly decode Adobe CMYK JPEGs in PDF export"
From further testing and investigation it appears that many PDF viewers
already have a workaround to invert Adobe CMYK JPEGs, so our generated
PDFs display incorrectly with those viewers due to double-inversion.

Further investigation will be needed to find a better solution that
doesn't cause regression for some PDF viewers; perhaps PDF viewers that
lack this inversion workaround should be changed to include it.  For now
we'll drop the patch to avoid shipping the regression in 1.16.0.

This reverts commit b207a932a2.

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=97612
Fixes: https://gitlab.freedesktop.org/cairo/cairo/issues/156
2018-10-16 09:53:00 -07:00
Bryce Harrington
868998a0f4 RELEASING: Clarify how to add the news item 2018-10-16 09:44:16 -07:00
Bryce Harrington
06ef6db957 Bump version for 1.15.15 2018-09-20 16:28:55 -07:00
Bryce Harrington
d9aaea0c1e 1.15.14 release
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-20 13:07:03 -07:00
Bryce Harrington
c1e37f4f02 doc: Drop tmpl support
Fix distcheck by dropping use of the now-obsolete gtkdoc-mktmpl.

In preparation for the upcoming 1.16 release, I've made a few changes to
get distcheck to pass.  I also updated it to run on Ubuntu 18.04, but
found that on newer distros distcheck won't run due to missing
gtkdoc-mktmpl, which has been deprecated upstream for some time.  The
patch below disables everything that references it, and enables
distcheck to finish successfully.

Unfortunately, this probably regresses portions of our document
generation, and thus will need some reimplementation work.  Anyone got
time to investigate a better solution for this?
2018-09-14 12:42:22 -07:00
Bryce Harrington
ad7ac7dbca Normalize one more test image with minor gradient differences
For me, with this fix, the base image test cases now pass 100%, when
running:

  make test TARGETS=image FORMAT=rgba

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-14 11:34:22 -07:00
Bryce Harrington
53e4775327 Normalize more test reference images with minor text rendering differences
The discrepancies in these tests appear to all be font rendering /
antialiasing, probably due to algorithmic changes in Pixman.

Some of these reference images were updated in Federico's recent patch,
so the fact that they differ on my system may indicate there may be some
system dependencies beyond just pixman, that can cause test result
variation from person to person.  Ideally, these would be isolated and
the tests modified to not have such dependencies.

Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
2018-09-14 11:34:22 -07:00