Commit graph

3974 commits

Author SHA1 Message Date
Jeremy Huddleston
cfd90e4e1b [mac] Correctly handle endianness in multi-architecture compiles on MacOS X 2008-03-13 17:48:28 -07:00
Jan Slupski
e7fe79aafe Fix for a memory leak in pixman.
Port of a 1.6 fix for a memory leak in pixman_region_init_rects/pixman_rect_alloc
when the count of boxes is 0.
2008-02-14 16:43:50 -08:00
Adrian Johnson
efc03cfcfb PDF: Add missing struct member when writing the pattern id
The bug did not occur on x86 due to 'id' being the first member of the
struct. However on some architectures this would result in an invalid
pattern id.
2008-01-18 21:46:13 +10:30
Carl Worth
ff5f5020cf Increment cairo version to 1.4.15 after the 1.4.14 release 2008-01-14 16:41:32 -08:00
Carl Worth
bdd93f5e8e Add miter-precision-ref.png to list of files to include in release. 2008-01-14 16:29:40 -08:00
Carl Worth
d45c003519 Update cairo version to 1.4.14 and library versioning to 13:7:11 2008-01-14 15:43:33 -08:00
Carl Worth
a6635fb5f5 NEWS: Mention the mixed-format-glyphs fix and update the date. 2008-01-14 15:41:43 -08:00
Behdad Esfahbod
549234a27f [scaled-font] Upgrade glyph mask as needed in case of mixed-format glyphs
In ecb895803b Carl made fallback show_glyphs
always use a A8 mask in case of mixed-format glyphs.  That's suboptimal if
there are ARGB32 glyphs.  Using masks smartly we can implement the desired
behavior.  Done now.

Cherry picked from commit 22d7f311f7
2008-01-14 15:29:17 -08:00
Carl Worth
35ed062a62 Migrate glyph mask to A8 in case of mixed-format glyphs.
This fixes the remaining image-backend problems with bug 13479:

	Ugly Courier New font with cairo 1.4.12
	https://bugs.freedesktop.org/show_bug.cgi?id=13479

although the xlib-backend had been fixed previously.

Specifically, if an A1 glyph is first encountered, then subsequent
glyphs will still be rendered with antialiasing, (previously they
would be rendered very poorly without antialiasing).

Similarly, if the first glyph encountered has component-alpha
sub-pixel antialiasing and then an A1 or A8 glyph is encountered
then all glyphs will rendered in A8 (grayscale antialiasing).
Previously, the non-subpixel-antialiased glyphs would not appear
at all.

Cherry picked from commit ecb895803b
2008-01-11 12:55:41 -08:00
Behdad Esfahbod
69549125fe [cairo-xlib] Support scale fonts with glyphs of multiple formats (#13479)
We maintain three Xrender glyphsets per scaled font, one for each of A1, A8,
and ARGB32.  This is required to correctly support fonts with bitmaps for
some glyphs but not all.
(cherry picked from commit 805b668260)
2008-01-09 11:22:50 -08:00
Behdad Esfahbod
8776061068 [cairo-ft] Revert "Force non-AA text when using a bitmap strike with only scaling transform." (#13479)
The reasoning for that commit was that fonts with bitmap strikes should be
rendered with antialiasing off for those (hopefully) few glyphs that don't
have a bitmap.

However, it turns out, there are fonts that have some, but very few, bitmaps,
and this changed forces non-AA rendering on them.  We now support multiple
glyph formats per font in the Xlib backend, so backing this out to let every
glyph render as is.  Fontconfig rules can be used to force AA off on a per-font
basis.

This reverts commit 06af5c2891.
(cherry picked from commit 83963d2a9e)
2008-01-09 11:22:38 -08:00
Carl Worth
ca1cd4c28e NEWS: Add notes for 1.4.14 2008-01-08 16:23:45 -08:00
Keith Packard
0a57aa8ac1 Directly check the miter corner to detect wild miters.
The original test for wild miters would only work with a square transform
(and, in fact, the original code required an identity transform). Instead of
fixing that, I replaced it with a more obvious test which makes sure the
miter corner lies between the two faces and not out in space somewhere.
(cherry picked from commit 7cf9a6e4e3)
2008-01-04 17:47:49 -08:00
Keith Packard
3fb0eaca42 Add new miter-precision test. Checks miter joins at many scales.
This demonstrates an error in cairo where miter joins are replaced with
bevels at high scale factors due to a test added to eliminate wild miters
drawn when the line faces are nearly parallel.

Cherry picked from commit 81e029edda
2008-01-04 14:40:11 -08:00
Adrian Johnson
1ea07fdb70 PS: fix compiler warning introduced by previous commit 2007-12-12 23:45:07 +10:30
Adrian Johnson
cd0ea998b6 PS: Use the correct bounding box in Type 3 fonts
Previously this was a fixed size.
2007-12-12 22:58:25 +10:30
Adrian Johnson
5c3f22816f Fix regression in Type1 Fallback
As a result of the changes to improve the status checking,
_cairo_type2_charstrings_init() was failing due to the failure
status returned when the font->output stream is destroyed.
This is because _cairo_type2_charstrings_init() does not
create an output stream.

Fix this by initializing font->output to NULL and only
destroy it if not NULL.
(cherry picked from commit 1441e165f2)
2007-12-12 22:30:18 +10:30
Adrian Johnson
a94dc7499b PS: Use correct glyphs widths for Type 3 fonts
Previously the widths were set to 0.
(cherry picked from commit f4b93cceb7)
2007-12-12 22:29:25 +10:30
Adrian Johnson
42b0552f11 PS: Fix the bounding boxes of Type 3 glyphs
When viewing with ghostscript the glyphs were clipped
(cherry picked from commit 78e8d3d9bd)
2007-12-12 22:28:11 +10:30
Adrian Johnson
5d591b7649 PS: Fix typecheck error with Type 3 and recent versions of gs
Ghostscipt requires the encoding vector to be filled in.
2007-12-12 22:27:13 +10:30
Adrian Johnson
9b4d398088 PS: Ensure that xyshow operator has a pair of offsets for each glyph
The last entry should have been "0 0" instead of "0".
(cherry picked from commit 5e8f60531a)
2007-12-12 21:31:56 +10:30
Bernardo Innocenti
3551152005 Fix version check for buggy_repeat on modular Xserver 1.x
The versioning of the X server has restarted from 1.0 in the
modular build.  So we adjust the text to avoid considering
the new servers buggy.

Cherry picked from commit d4138d1161
2007-12-05 09:29:22 -08:00
Carl Worth
957056368b Increment cairo version to 1.4.13 after the 1.4.12 release 2007-11-27 08:05:08 -08:00
Carl Worth
442fa9a106 Increment version to 1.4.12 and 13:6:11 2007-11-26 22:31:32 -08:00
Carl Worth
b28c7a90fc NEWS: Add notes for cairo 1.4.12 2007-11-26 22:30:47 -08:00
Carl Worth
617d3f5738 Mark bitmap-font as XFAIL
I don't know where the PDF failure is coming from, (it appears
to be using a too-small font in the rotate cairo_show_text
case), but I'm seeing the same behavior in 1.4.10 so this
is not a regression compared to that for the purpose of the
1.4.12 release.
2007-11-26 21:24:54 -08:00
Carl Worth
bc67e2a37b Update two PS reference images for mysterious single-pixel change
It seems ft-vertical-layout-type1 and ft-vertical-layout-type3
change rasterization slightly from time to time, (may be due
to changes in the system installation of ghostscript).
2007-11-26 21:24:54 -08:00
Richard Hult
476f888f4e [atsui] Use ascent+descent+leading to get the distance between baselines
The height is currently mapped to the atsui metrics property capHeight, which
is documented as "The height of a capital letter in the font from the baseline
to the top of the letter".

That doesn't match what height is in cairo, it should be the disctance between
baselines. This patch that fixes that (and makes webkit on GTK+ OS X
layout nicely).
(cherry picked from commit 4270cd3358)
2007-11-26 21:24:54 -08:00
Brian Ewins
5c2ad5f69d [configure.in] fix atsui experimental warning
The 'experimental' warning for atsui was appearing
for --enable-quartz not --enable-atsui as it should.
(cherry picked from commit 3141b21c0c)
2007-11-26 21:24:54 -08:00
Keith Packard
e9de14eb4d Force non-AA text when using a bitmap strike with only scaling transform.
When the current font size matches one of the available fixed sizes, and
the overall transform has only scaling components, FreeType will use the
fixed size bitmaps by default. For glyphs which do not have bitmaps,
force them to be rendered in monochrome instead of anti-aliased so
that they all match nicely.
(cherry picked from commit 06af5c2891)
2007-11-26 21:24:53 -08:00
Carl Worth
19e29dfb80 Fix degenerate-pen test case by removing the triggering assertion
Instead we choose either the first or last pen vertex as
appropriate.

This makes the degenerate-pen pass stop failing on an
assertion, and passes for most backends. It's still failing
for the PDF backend, but that looks like a new, PDF-specific
bug.
(cherry picked from commit 448c931425)
2007-11-26 21:24:53 -08:00
Carl Worth
efcaee8f83 Limit miters for small angles
This fixes the current failure get-path-extents, which is a
demonstration of the following bug:

	cairo_stroke_extents() gives wrong result for arcs in some cases
	https://bugs.freedesktop.org/show_bug.cgi?id=7245

Many thanks to Michael Urman whose review of early versions of
this work found a fatal mistake in my algebra.
(cherry picked from commit 00d701ff7d)
2007-11-26 21:24:53 -08:00
Chris Wilson
b7baef1433 [cairo-surface] Fix typo in doc.
s/INVALUE_FORMAT/INVALID_FORMAT/
(cherry picked from commit 0d42af2427)
2007-11-26 21:24:53 -08:00
Carl Worth
7c70113149 Fix typo in _cairo_gstate_fini
Obrigado a Luiz Americo Pereira Camara <luizmed@oi.com.br>
(cherry picked from commit a69d473130)
2007-11-26 21:24:52 -08:00
Brian Ewins
0ec9e1b4fa [quartz] return status instead of CGPatternRef
Returning status improves error handling, since
returning NULL doesn't let us distinguish different
types of error.
(cherry picked from commit 8f6abdbc26)
2007-11-26 21:24:52 -08:00
Brian Ewins
a83e546253 [quartz] return status instead of cairo_quartz_surface_t
Returning status improves error handling, since
returning NULL doesn't let us distinguish different
types of error.
(cherry picked from commit cfb26fdf0f)
2007-11-26 21:24:52 -08:00
Brian Ewins
0951d2a9ab [quartz] return status instead of CGShadingRef
Returning status improves error handling, since
returning NULL doesn't let us distinguish different
types of error. Suggested by Chris Wilson.
(cherry picked from commit dec3099585)
2007-11-26 21:24:52 -08:00
Brian Ewins
044de7fa7a fix dash-zero-length test
Quartz was failing the dash-zero-length test for odd numbers
of dashes; it seems cairo wants 3 dashes to be on-off-on,
off-on-off, wheras quartz uses on-off-on, on-off-on. Fixed
by doubling the number of dashes used.
(cherry picked from commit b9c065df74)
2007-11-26 21:24:51 -08:00
Brian Ewins
5a3aa313d4 Implement EXTEND_NONE for gradients.
Fixes linear and radial gradients, which were displaying with
extend_pad when extend_none was requested. Makes the
radial-gradient test pass.
(cherry picked from commit f334ee0397)
2007-11-26 21:24:51 -08:00
Brian Ewins
977ba306f9 call _cairo_error on failure
Call _cairo_error to enable setting a breakpoint on quartz errors.
(cherry picked from commit 0eeec372c0)
2007-11-26 21:24:51 -08:00
Brian Ewins
4fdc3a69fd do not return a cairo_status_t of UNSUPPORTED
We had a bug which converted cairo_int_status_t to cairo_status_t,
causing an assertion; reported at http://developer.imendio.com/node/128.
Return the generic out of memory error instead.
(cherry picked from commit 8c8ec63903)
2007-11-26 21:24:51 -08:00
Brian Ewins
6e4ff01d0b do not ignore errors, return NULL instead (moz#874315)
In the quartz backend there are occasional errors where returning NULL
can be used to signal that an error has occured.

Mozilla bug #874315.
(cherry picked from commit 6fec51990e)
2007-11-26 21:24:50 -08:00
Brian Ewins
ca132774c4 do not ignore errors in setup_source
In setup_source we were ignoring a return value, but we can't relay
it to the caller. This patch treats the error as an unsupported
operation.
(cherry picked from commit 07fd091e3e)
2007-11-26 21:24:50 -08:00
Brian Ewins
f27164c899 do not ignore errors when creating styles.
This fixes statuses being ignored when calling
CreateSizedCopyOfStyle. As a side effect, it cleans up
two other bugs - the font object was sometimes not
freed, and a the scaled font mutex was aquired recursively,
causing a hang in the invalid-matrix test.
(cherry picked from commit b6b9cef713)
2007-11-26 21:24:50 -08:00
Brian Ewins
c00bf48648 do not ignore ATSUI errors.
This fixes multiple instances where the return value of an ATSUI
call was ignored and converts them into CAIRO_STATUS_NO_MEMORY.
As a side effect it fixes a utf8 array not being freed.
(cherry picked from commit 4885a12c68)
2007-11-26 21:24:50 -08:00
Brian Ewins
23b6c2fe9d do not ignore errors in glyph paths
When interpreting glyph paths in ATSUI callbacks we were ignoring
the cairo status. We need to return this to the caller. In order
to do this we introduce a custom OSStatus code in the range that
Apple reccommend.
(cherry picked from commit b498c928be)
2007-11-26 21:24:50 -08:00
Chris Wilson
b7af909c82 [cairo-xlib] Check source for XRender support.
Do not rely on the assumption that if the destination has render support
then the source has it as well - breaks when the boilerplate disables
render support for a surface.

Similarly do not set the XRender attributes on the source surface
unless it actually has a xrender_format.
(cherry picked from commit 3211d810d3)
2007-11-26 21:24:49 -08:00
Behdad Esfahbod
a81ff21d53 [cairo-xlib] Release glyph surfaces if we made them to be generated
The reasoning is that right now, applications render glyphs to images,
upload it to the X server, and keep a local copy in the cache.  The X
server works hard to reuse glyph renderings, by hashing glyph images and
reusing them.  So we are wasting memory in cairo apps that don't use the
glyph surface after uploading to the server, which is the case if you
don't use the glyph in an image surface.  The patch does not release the
glyph surface if it already existed in the cache, so, worst case
scenario is that we render the glyph twice, if you first use it with
xlib, then with image surface.  That effect should be negligible.
(cherry picked from commit 76e3b3cdc3)
2007-11-26 21:24:49 -08:00
Chris Wilson
c1464e04c4 [cairo-xlib-surface] Match content to xrender_format using the channel masks.
_xrender_format_to_content() was using the channel offset to determine
whether the format supported a content type.
For example, the XRenderPictFormat for the A8 format looks like:
    direct.alpha = 0; direct.alphaMask = 0xff;
    direct.red   = 0; direct.redMask   = 0x00;
    direct.green = 0; direct.greenMask = 0x00;
    direct.blue  = 0; direct.blueMask  = 0x00;
which _xrender_format_to_content() matched as CAIRO_CONTENT_COLOR.

Switch to using the channel masks for deducing content type.
(cherry picked from commit 8ae7782737)
2007-11-26 21:24:49 -08:00
Chris Heath
2e76f8b617 [autogen.sh] Tolerate tput failure (#12757)
(cherry picked from commit 189feaf352)
2007-11-26 21:24:48 -08:00