Commit graph

6631 commits

Author SHA1 Message Date
Behdad Esfahbod
5c201ef5cf [scaled-font] Make cairo_debug_reset_static_data() work again
I broke it in a5983929f8
2008-12-26 00:05:19 -05:00
Behdad Esfahbod
730ed68ec1 [pattern] Fix comment typo 2008-12-25 23:29:02 -05:00
Behdad Esfahbod
a5f4a97aa4 [twin] Don't hint pen if hint-style is SLIGHT 2008-12-25 02:48:26 -05:00
Behdad Esfahbod
0c7eaf6e0a [twin] Improve glyph hints 2008-12-25 02:46:27 -05:00
Behdad Esfahbod
e6205ea5a3 [twin] Improve hinting 2008-12-25 02:10:16 -05:00
Behdad Esfahbod
da8658b675 [twin] Hint dots 2008-12-25 01:35:36 -05:00
Behdad Esfahbod
f4c81e18f8 [twin] Disable pen hinting if hinting is off 2008-12-25 01:29:41 -05:00
Behdad Esfahbod
af91fc1974 [twin] Optimize hinting 2008-12-25 01:24:46 -05:00
Behdad Esfahbod
439959d1af [twin] Implement hinting 2008-12-25 01:06:47 -05:00
Behdad Esfahbod
9f9f5317dc [util] Fix pangram 2008-12-24 22:29:59 -05:00
Behdad Esfahbod
8296bc74c8 [twin] Reduce the weight just a bit, such that bold doesn't look as bad 2008-12-24 18:00:04 -05:00
Behdad Esfahbod
b2f8962545 [twin] Adjust baseline 2008-12-24 17:29:21 -05:00
Behdad Esfahbod
f980d017d2 [twin] Remove serif setting
I don't think I'm going to implement serif-drawing soon, so, remove the
infrastructure.  Can always be added back later.
2008-12-24 17:00:43 -05:00
Behdad Esfahbod
1116febb40 [twin] Implement small-caps 2008-12-24 16:32:25 -05:00
Behdad Esfahbod
6767673961 [twin] Implement stretch 2008-12-24 16:13:12 -05:00
Behdad Esfahbod
0656e947f1 [twin] Implement slant 2008-12-24 15:43:17 -05:00
Behdad Esfahbod
9d493fcd16 [twin] Disable the serif mode 2008-12-24 15:36:57 -05:00
Behdad Esfahbod
6c1d21bf89 [twin] Implement monospace 2008-12-24 03:48:00 -05:00
Behdad Esfahbod
5def8c587b [twin] Fix dots 2008-12-24 03:48:00 -05:00
Jeff Muizelaar
a303bbaea3 [font-face-get-type] Fix test to cleanup the surface and context properly
Destroy the context and the surface even when the test fails.

I ran into this because cairo_debug_reset_static_data() is called between the
tests on the quartz backend (it doesn't fork) and isn't on other backends? This
is perhaps a mistake...
2008-12-23 16:12:56 -05:00
Behdad Esfahbod
52cc31a7fa [util] Add cairo-view 2008-12-23 13:48:52 -05:00
Behdad Esfahbod
418c7ef133 [twin] Adjust font extents 2008-12-23 13:41:04 -05:00
Behdad Esfahbod
96e41c28e9 [twin] Minor cleanup 2008-12-23 13:41:04 -05:00
Behdad Esfahbod
556f6ce364 [twin] close_path the Q 2008-12-23 13:41:04 -05:00
Behdad Esfahbod
6929ed800d [twin] Fix serif option parsing. Also make serif and weight do something 2008-12-23 13:41:04 -05:00
Behdad Esfahbod
d423339fce [twin] Add face properties
Just parse them now.  We don't use them yet.
2008-12-23 13:41:03 -05:00
Chris Wilson
93672d842f [test] Fix reference handling in user-font-rescale
user-font-rescale stored the current font on the context in order to
create a rescaling proxy font. As we failed to take a reference to the
font, it caught us by surprise when the font disappeared as we modified
the context before creating our proxy. Ho hum.
2008-12-23 15:03:08 +00:00
Adrian Johnson
5ad65dc4be Document PDF restrict_to_version API 2008-12-23 15:04:10 +10:30
Adrian Johnson
1869e0240b Document cairo_surface_(set|get)_mime_data() and mime types 2008-12-23 15:04:06 +10:30
M Joonas Pihlaja
1f894033f0 [spans] Close open subpaths when filling with a scan converter.
As reported by Christian Persch, open subpaths weren't being
closed when rendering to an image surface:

http://bugs.freedesktop.org/show_bug.cgi?id=19240
2008-12-23 03:32:07 +02:00
M Joonas Pihlaja
0aa34c6435 [svg] Fix build when building only the svg vector surface.
The SVG vector surface pulls in font subsetting and that in turns
uses the PDF operators in cairo-type3-glyph-surface.c.
2008-12-23 03:31:41 +02:00
M Joonas Pihlaja
38ec6e302c [test] Fix any2ppm build when building without the full complement of surfaces.
It was complaining about g_init_type () being used without the proper includes
which would have been pulled in by the svg or poppler includes.
2008-12-23 02:05:32 +02:00
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