Commit graph

6599 commits

Author SHA1 Message Date
Adrian Johnson
6ce97907ed win32-font: truncate instead of fail if toy font name too long
http://lists.cairographics.org/archives/cairo/2008-December/016109.html
2008-12-22 11:09:27 +10:30
Adrian Johnson
d99583bae6 Fix win32 font breakage
as a result of the toy font face changes in f7ab65e9b0
2008-12-21 17:09:20 +10:30
Behdad Esfahbod
a5983929f8 [toy-font-face] Move toy font face code in a file of its own 2008-12-20 01:18:12 -05:00
Behdad Esfahbod
8bf49b27ae [font-face] Use cairo_font_face_t instead of toy, for nil objects
And with a NULL backend.  We are not supposed to read the nil objects
afterall.

If this causes crashes, the crash site should be fixed.
2008-12-20 01:06:30 -05:00
Jeff Muizelaar
e3675f8ac0 Fix definition of _cairo_quartz_font_face_backend
Removes the NULL so that _cairo_quartz_font_face_scaled_font_create
is in the correct location.
2008-12-19 08:50:26 -05:00
Jeff Muizelaar
fa7d96e123 Fix compilation of quartz surface.
Declares _cairo_quartz_scaled_font_backend ahead of time and makes it static.
Also, removes the 'static' from the _cairo_quartz_font_backend definition.
2008-12-19 08:47:07 -05:00
Jeff Muizelaar
f8886ad1b3 [scaled-font-zero-matrix] Destrory scaled font and font options
Oops.
2008-12-18 20:50:20 -05:00
Jeff Muizelaar
4567692326 Add test creating a scaled font with a zero ctm matrix 2008-12-18 18:03:40 -05:00
Jeff Muizelaar
18054ef00c [test] Quartz doesn't like being forked
When the cairo-test-suite forks CoreFoundation complains with:
"The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
When forked so avoid doing it in the test suite for now. In the future we should investigate
the possibility of a work around.
2008-12-18 18:01:52 -05:00
Jeff Muizelaar
b4e0d489bb Merge branch '1.8'
Conflicts:
	NEWS
	build/Makefile.am.changelog
	cairo-version.h
	src/cairo-gstate.c
2008-12-18 17:25:17 -05:00
Jeff Muizelaar
f60da9a379 Fix _compute_transform to check for nearly degenerate matrices
If a matrix was something like [0 .000001 0, .000001 0 0] the old code would
assume that xx and yy were greater than 0 and turn the nearly degenerate matrix
into an actual degenerate one. This caused things to blow up later on. Now we
check that our nearly rectangular matrices are not nearly degenerate, and let
the nearly degenerate ones fall through to the non-rectangular path.

Note: I'm not sure why NEARLY_ZERO(d) is fabs(d) < 1/65536 instead of some
other value.  Hopefully, it's a useful definition.

This problem was found by a test case attached to:
https://bugzilla.mozilla.org/show_bug.cgi?id=467423
2008-12-18 17:07:25 -05:00
Chris Wilson
813cbf13dd [path] Separate the approx. bounds into 3 distinct functions
Based on feedback from Jeff Muizelaar, there is a case for a very quick
and dirty extents approximation based solely on the curve control points
(for example when computing the clip intersect rectangle of a path) and
by moving the stroke extension into a core function we can clean up the
interface for all users, and centralise the logic of approximating the
stroke extents.
2008-12-18 14:55:20 +00:00
Chris Wilson
dea40e61ba [path] Return the fixed-point bounds of the path
When analysing the stroke extents, we need the original fixed-point
extents so that we do not incur an OBO when we round-to-integer a second
time. We also need a more accurate estimate than simply using the control
points of the curve, so pass in tolerance and decompose until someone
discovers a cheaper algorithm to determine the precise aligned bounding
box of a bezier curve.
2008-12-18 12:06:47 +00:00
Chris Wilson
3a53e0261b [test] Update twin reference images.
Closing the 'o' in twin has removed a slight artefact - update the reference
images to match.
2008-12-18 12:06:46 +00:00
Chris Wilson
c2478de26c [twin] Switch internal users to the new name.
s/<cairo>/@cairo:/
2008-12-18 12:06:46 +00:00
Chris Wilson
3424b5f8c8 [scaled-font] Make check-doc happy
Replace a structure marker '#' with a macro marker '%'.
2008-12-18 12:06:46 +00:00
Chris Wilson
449bf0bb7b [script] Silence incorrect compiler warnings
Bah, the compiler failed to do its IPA correctly and wrongly complained
about potential use of uninitialised out-params guarded by the return
value. Silence them!
2008-12-18 12:06:46 +00:00
Chris Wilson
ce0b136a44 Query the backend to see if we can repaint the solid pattern.
If we are dithering on the Xlib backend we can not simply repaint the
surface used for a solid pattern and must recreate it from scratch.
However, for ordinary XRender usage we do not want to have to pay that
price - so query the backend to see if we can reuse the surface.
2008-12-18 12:06:45 +00:00
Chris Wilson
0df43251d4 [replay] Take advantage of unresolved fonts
As Behdad has changed the underlying ft-font to accept unresolved patterns,
take advantage of that to simplify the replay code.
2008-12-18 12:06:35 +00:00
Chris Wilson
97a00bdd4e [cairoint.h] Wrap macro in parenthesis
Ensure that the stride calculation macro is not influenced by surrounding
precedence issues by enclosing it in a pair of parenthesis.
2008-12-18 10:40:14 +00:00
Chris Wilson
aa65e756d4 [script] Avoid creating 0x0 windows
XCreateWindow dies if asked to create a 0x0 window, so don't and use a 1x1
pixel window for a zero-sized surface.
2008-12-18 10:40:14 +00:00
Chris Wilson
6458903c95 [image] Eliminate the short-lived context used for coercing.
When coercing from one image format to another we performed a paint
operation using a temporary context - this is overkill as we can just call
_cairo_surface_paint() directly.
2008-12-18 10:40:14 +00:00
Chris Wilson
9b46d13b6c [trace] Runtime version check.
Check that the application is using cairo >= 1.9 before attempting to
query the mime-data.
2008-12-18 10:40:13 +00:00
Chris Wilson
2d790daa95 [pattern] Use a solid pattern for a uniform gradient.
If each color stop in a gradient is identical, replace the gradient
surface with a simple solid surface. As seen in the wild.
2008-12-18 10:40:13 +00:00
Chris Wilson
25a4677200 [analysis] Use approximate extents.
Use the approximate path based extents to avoid tessellation.
2008-12-18 10:40:13 +00:00
Behdad Esfahbod
18bca91411 [twin] close_path the 'o' 2008-12-18 02:12:14 -05:00
Behdad Esfahbod
5ee6aad471 [toy] Use twin font if font backend returns UNSUPPORTED 2008-12-17 18:19:24 -05:00
Behdad Esfahbod
eb069094ea Treat any toy family starting with "@cairo:" as request for twin 2008-12-17 18:19:24 -05:00
Jeff Muizelaar
32c6610905 Call _cairo_error when propagating error status from the font_face. 2008-12-17 17:43:37 -05:00
Jeff Muizelaar
1d72e53c3e Add a missing _cairo_error() to a bunch of status returns. 2008-12-17 17:42:18 -05:00
Behdad Esfahbod
af3a892c3e [ft] Remove stale comment 2008-12-17 16:45:28 -05:00
Karl Tomlinson
0137b9bd32 [ft] Don't call FT_Done_Face() on faces we did not create 2008-12-17 16:42:20 -05:00
Karl Tomlinson
e4d7c87b5e [ft] Don't call FT_Done_Face() on faces we did not create 2008-12-17 16:40:12 -05:00
Behdad Esfahbod
6778a5f67a [.gitignore] Update 2008-12-17 16:20:18 -05:00
Behdad Esfahbod
26f4719999 [scaled-font] Improve docs 2008-12-17 16:08:32 -05:00
Behdad Esfahbod
f7ab65e9b0 Clean up toy font face handling
This commit moves the toy-to-real mapping from the scaled font creation
time to font face creation.  A toy font face will keep an internal ref
to an implementation face.  Then cairo_scaled_font_create() will simply
substitute the implementation face before creating anything.

This also modifies the cairo-ft toy creation in that we now create a
non-resolved pattern and store it in a cairo-ft font-face.  We then
do the resolving and unscaled font creation at scaled-font creation
time.  This also means that cairo_ft_font_face_create_for_pattern()
now accepts non-resolved patterns too, and does the right thing about
them.  As much as that can be called right.

Some testing of toy font creation performance is in order, as is testing
win32 and quartz font backends.
2008-12-17 15:13:35 -05:00
Chris Wilson
43edb4dd7b Fix compilation with gcov
We need to add --coverage to LDFLAGS, so create CAIRO_LDFLAGS and use that
to populate AM_LDFLAGS.
2008-12-14 16:44:03 +00:00
Chris Wilson
bcea3151d6 [test] Add missing joins.ref.png
Missed this file when adding the reference images for joins.
2008-12-14 16:44:03 +00:00
Chris Wilson
8cec548854 [NEWS] Add notes for 1.8.6
Add the historical blurb for 1.8.6.
2008-12-14 16:42:59 +00:00
Chris Wilson
0a1d194ad8 [perf] Fix for git-1.6
git-1.6 moved all the subcommands out of the PATH so update our usage.
2008-12-14 16:41:17 +00:00
Chris Wilson
1c2eba92c1 [RELEASING] Update Makefile for git-1.6
Git moved all the subcommands out of the PATH, so we need to update our
usage.
2008-12-14 16:41:01 +00:00
Chris Wilson
2fa6b63537 [RELEASING] Correct a few minor typos.
As I was reading through the instructions, take the opportunity to fix a
few spelling mistakes.
2008-12-14 16:39:55 +00:00
Chris Wilson
1950abd14c [doc] Fix erroneous doc comment.
A normal comment was marked as a gtk-doc entry and thus causing gtk-doc to
complain.
2008-12-14 16:39:24 +00:00
Chris Wilson
9485cd947f Increment version to 1.8.7 after the 1.8.6 release. 2008-12-14 16:35:14 +00:00
Chris Wilson
e2a2eddcfb Increment version to 1.8.6
In preparation for the next stable release.
2008-12-14 14:54:35 +00:00
Chris Wilson
ef7c42a7d3 [NEWS] Add notes for 1.8.6
Add the historical blurb for 1.8.6.
2008-12-14 14:54:35 +00:00
Chris Wilson
ce91e6ac36 [perf] Fix for git-1.6
git-1.6 moved all the subcommands out of the PATH so update our usage.
2008-12-14 14:54:34 +00:00
Chris Wilson
f8372509af [RELEASING] Update Makefile for git-1.6
Git moved all the subcommands out of the PATH, so we need to update our
usage.
2008-12-14 14:54:30 +00:00
Chris Wilson
9faa9a2149 [RELEASING] Correct a few minor typos.
As I was reading through the instructions, take the opportunity to fix a
few spelling mistakes.
2008-12-14 11:40:12 +00:00
Chris Wilson
b1be419651 [doc] Fix erroneous doc comment.
A normal comment was marked as a gtk-doc entry and thus causing gtk-doc to
complain.
2008-12-14 11:26:56 +00:00