Commit graph

8865 commits

Author SHA1 Message Date
Andrea Canciani
c5fc8fa62f quartz: Use NOTHING_TO_DO instead of SUCCESS where appropriate
Returning CAIRO_INT_STATUS_NOTHING_TO_DO removes some code that
specifically handles it to convert to CAIRO_STATUS_SUCCESS. This
is already performed out of the backend, in the upper layers, so
it is not needed here.
2010-10-07 20:44:50 +02:00
Andrea Canciani
eae5fafc89 quartz: Beautify code
Remove redundant parentheses and reference/dereferences.
2010-10-07 20:44:50 +02:00
Andrea Canciani
f93603fda0 quartz: Whitespace cleanup 2010-10-07 20:44:50 +02:00
Andrea Canciani
6ff5cbd8a9 quartz: Mark failures as unlikely 2010-10-07 20:44:50 +02:00
Andrea Canciani
2f4a47c6bf quartz: Fix function call coding style
Cairo coding style specifies a single space between the function
name and the parentheses.
2010-10-07 20:44:49 +02:00
Andrea Canciani
692f20a859 quartz: Don't typecast surfaces
Casting to (cairo_surface_t *) is considered bad practice. The
correct way to get a reference to the generic surface information
is &(surface->base)
2010-10-07 20:44:49 +02:00
Andrea Canciani
b922477e4e quartz: Check for valid patterns
The pattern handling code ensures that 0 stops patterns are reduced
to clear solid patterns before being passed down to the backend.
An assertion is used to make sure that the assumption actually holds,
removing the duplication of the reduce-to-solid-clear logic.
2010-10-07 20:44:49 +02:00
Andrea Canciani
c9aa393a4d quartz: Assert upon invalid enum values
Invalid enum values were being ignored (and replaced by a default
value). This behavior is not desirable on development builds,
because an explicit failure is much easier to track.
Assertions allow release builds to keep on with the old behaviour,
while development builds fail as soon as the invalid operaiton is
performed.
2010-10-07 20:44:49 +02:00
Andrea Canciani
9c22f97ebd quartz: Remove unused argument from _cairo_surface_to_cgimage 2010-10-07 20:44:49 +02:00
Adrian Johnson
ef60650bd6 Fix bug in subsetting check for winansi characters 2010-10-07 23:09:52 +10:30
Adrian Johnson
390a6aa997 remove unused variable 2010-10-06 22:43:36 +10:30
Adrian Johnson
ea45bc1b4b PS: Allow %%BoundingBox and %%PageBoundingBox to be overriden using DSC comments 2010-10-06 22:38:57 +10:30
Adrian Johnson
b950212a2a CFF subset: add support for latin subsets 2010-10-06 22:34:57 +10:30
Andrea Canciani
f20814e07e xcb: Do not return value in void function
Sun Studio Compiler complains:
"cairo-xcb-surface.c", line 585: void function cannot return value
even if the returned value is void.
Some minor code restructuring removes the issue.
2010-10-05 10:36:38 +02:00
Chris Wilson
e675660ca7 xcb: Correct a minor typo prevent an assert from firing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-10-04 22:08:33 +01:00
Uli Schlachter
b6f830bab0 xcb: Correctly clear the composite surface
Calling _cairo_xcb_surface_render_paint() with CAIRO_OPERATOR_CLEAR and no clip
just results in the surface's deferred_clear flag to be set to TRUE. Fix this by
calling _cairo_xcb_surface_clear() directly instead.

This half-fixes the clip-shape test in the test-suite. The difference to the
reference image becomes much smaller at least. :(

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-04 18:16:57 +02:00
Uli Schlachter
0a651b93a4 xcb: Fix compiler warning about unused result
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-04 12:48:23 +02:00
Uli Schlachter
be50c32ed5 xcb: Fix CAIRO_OPERATOR_IN
The if that is being removed here resulted in no drawing done at all when it
skipped the call to _render_fill_boxes(). This is obviously not what
CAIRO_OPERATOR_IN wants.

This fixes the "operator" test in the test suite.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-04 12:46:32 +02:00
Uli Schlachter
c200560929 XCB: Fix some weird code
In the XCB backend, drawing a surface pattern always caused an extend of
CAIRO_EXTEND_NONE to be used. This caused e.g. all the
surface-pattern-scale-down-extend-* tests in the test suite to fail.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-04 12:46:32 +02:00
Adrian Johnson
7d2979e446 Don't embed cmap in TrueType fonts embedded in PostScript
it doesn't print on a LaserJet 4050
2010-10-02 20:07:34 +09:30
Adrian Johnson
cd74f5edab pdf-operators: word wrap latin text strings 2010-10-02 18:13:49 +09:30
Adrian Johnson
165a14b564 pdf-operators: fix bug that was causing unnecessary repositioning of text
This optimizes the output to increase the maximum amount of text that
is emitted with a single Tj operator.
2010-10-01 19:18:28 +09:30
Adrian Johnson
af3b550bc1 PDF: Add support for latin subsets
Add support for Type 1 and TrueType latin subsets.

CFF latin subsets are not yet implemented.
2010-10-01 19:15:31 +09:30
Adrian Johnson
85c25d79f7 TrueType subsetting: embed a cmap for latin subsets
To support latin subsets in PDF, TrueType fonts require a cmap to map
unicode to glyph indices for all characters in the winansi encoding.
2010-10-01 19:15:30 +09:30
Adrian Johnson
7c268bc838 PS: Enable support for latin subsets
Make PS TrueType embedding use the winansi glyph mapping for latin subsets.

Enable use of latin subsets in PS.
2010-10-01 19:15:30 +09:30
Adrian Johnson
52f3db92a7 Type 1 fallback: add support for latin subsets
For latin subsets the /Encoding array maps the latin encoding to the
font glyphs.
2010-10-01 19:15:30 +09:30
Adrian Johnson
4a0e5b7ced Type 1 subsetting: add support for latin subsets
For latin subsets the /Encoding array maps the latin encoding to the
font glyphs.
2010-10-01 19:15:30 +09:30
Adrian Johnson
01ee091ee9 Add winansi glyph names
for the PS backend and Type 1 subsetters to use with latin fonts.
2010-10-01 19:15:30 +09:30
Adrian Johnson
e62891cd8f Return latin to glyph mapping in cairo_scaled_font_subset_t
so that font subsetters can include the latin to glyph encoding in the
subsetted font.
2010-10-01 19:15:30 +09:30
Adrian Johnson
807e690de4 pdf-operators: output (abc) style strings when font is latin 2010-10-01 19:15:26 +09:30
Adrian Johnson
f1ca978032 Add capability for font subsets to put latin glyphs in a separate subset
This is required to allow PDF/PS output to use "(this is ascii)" style
strings that can be post processed by applications like psfrag. It
will also reduce the file size when a large amount of latin text is
used due to the 8-bit encoding instead of the 16-bit used for CID
fonts.

The winansi encoding (CP1252) is used for the latin subset as this is
a standard PDF encoding. Some PDF readers have buggy support for non
standard PDF 8-bit encodings.
2010-10-01 17:53:11 +09:30
Adrian Johnson
3f817dcfd3 Fix font metrics in PDF Type 1 fonts
edcefa87 introduced a bug in the Type 1 font metrics in PDF files.
2010-10-01 17:41:28 +09:30
Chris Wilson
877bc14eaf Merge branch '1.10' 2010-09-29 13:57:36 +01:00
Chris Wilson
66ace8cd33 image: The a8 in-place span compositing is only valid for SOURCE
Fixes test/a8-clear.

Reported-by: Jeremy Moles <jeremy@emperorlinux.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-29 13:57:15 +01:00
Chris Wilson
05faebd584 test: Add a8-clear
Reported-by: Jeremy Moles <jeremy@emperorlinux.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-29 13:57:04 +01:00
Chris Wilson
ac6fd51fe4 image: Silence a compile warning
cairo-image-surface.c: In function ‘_cairo_image_reset_static_data’:
cairo-image-surface.c:1006: warning: old-style function definition

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-29 13:56:58 +01:00
Chris Wilson
7b308fdcc9 version: 1.11.1
Mark the opening of master for new development work. A few quiets have
passed since 1.10 with no major brown bag incident, so lets start
harvesting the work for 1.12.

Go Andrea, go!
2010-09-24 11:31:03 +01:00
Tim Janik
75e2b7c7b5 cairo: docu fix for cairo_set_source_surface 2010-09-23 15:12:06 +02:00
Kouhei Sutou
4cf5260e99 xml: fix a typo to correct the indentation after <path></path>
Signed-off-by: Kouhei Sutou <kou@cozmixng.org>
2010-09-12 10:07:09 +01:00
Tomáš Chvátal
0f070bd5ff Fix posix calls in configure.ac test code.
Fixes https://bugs.gentoo.org/show_bug.cgi?id=336779

Signed-off-by: Tomáš Chvátal <scarabeus@gentoo.org>
2010-09-11 21:59:17 +01:00
Chris Wilson
f59771051b drm: Add missing header file for tarball 2010-09-10 13:38:33 +01:00
Chris Wilson
8fca990be7 cairo: Remove trailing comma from cairo_device_t
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30115
Reported-by: Murray Cumming <murrayc@murrayc.com>
2010-09-10 13:35:11 +01:00
Andrea Canciani
291876ad34 test: do not leak resources
Silence some leak reports by check-valgrind.
2010-09-10 07:34:43 +02:00
Andrea Canciani
8fda4ab1cc image: add _cairo_image_reset_static_data
Image has static caches which needs to be reset to make
cairo_debug_reset_static_data behave as expected.
Silences a bunch of leak reports by check-valgrind.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-09 17:25:00 +02:00
Andrea Canciani
ca775cbf5a test: do not leak resources
Silence two leak reports by check-valgrind.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-09 17:24:13 +02:00
Carlos Garcia Campos
2b6c4c2a64 recording: Document CAIRO_HAS_RECORDING_SURFACE macro 2010-09-09 11:28:03 +02:00
Carlos Garcia Campos
d8f88cf3f9 recording: Fix cairo_recording_surface_create() doc comments
The name of the parameters in the docs should match the name of the
function parameters. Added also return value docs.
2010-09-09 11:00:42 +02:00
Carlos Garcia Campos
737880260f recording: Add section doc comments 2010-09-09 10:57:13 +02:00
Carlos Garcia Campos
1ddc1bfa01 doc: Add section for recording surface 2010-09-09 10:54:50 +02:00
Chris Wilson
a48eccbf77 configure: Fix typo "(requires both --enable-xcb)" 2010-09-07 13:58:29 +01:00