Commit graph

4564 commits

Author SHA1 Message Date
Behdad Esfahbod
ab188f2e90 [cairo-ft] Disable embedded bitmaps if hinting style NONE is requested 2008-01-25 18:28:57 -05:00
Behdad Esfahbod
2df9944a8a [.gitignore] Add check-has-hidden-symbols.i 2008-01-25 18:28:57 -05:00
Behdad Esfahbod
3d2144b6af [cairo-ft] Fix font metrics computation for bitmap fonts and no metrics-hinting
Preivously we were returning NAN font metrics.  Fixed now.  Makes bitmap-font
test pass again.
2008-01-25 18:28:57 -05:00
Vladimir Vukicevic
c621d8d719 [ps] Pad image mask lines out to full lines
The PostScript backend was generating image masks with packed mask
bits, when PS seems to expect each line of the mask to be padded out
to 8 bytes.

Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=407360
2008-01-25 15:01:57 -08:00
Behdad Esfahbod
bae496df11 [test/bitmap-font] Test under all combinations of hinting, test font metrics too
This is now failing as we compute NAN font metrics for bitmap-only fonts under
disabled metrics hinting.  A very infamous bug excercised with PangoCairo's PDF
output.
2008-01-25 08:03:32 -05:00
Behdad Esfahbod
20c8531243 [test/text-zero-len] Test text and font extents for font size 0 2008-01-25 07:14:07 -05:00
Behdad Esfahbod
83bd590760 [test] Test that cairo_text_extents() and cairo_scaled_font_text_extents() match
in results.
2008-01-25 07:02:25 -05:00
Behdad Esfahbod
4c432b0955 [cairo-scaled-font] Fix bug in glyphs bounding box computation
In 02970ac8cf Vlad introduced the following
innocent-looking change:

-    short min_x = INT16_MAX, max_x = INT16_MIN;
-    short min_y = INT16_MAX, max_y = INT16_MIN;
+    cairo_point_int_t min = { CAIRO_RECT_INT_MIN, CAIRO_RECT_INT_MIN };
+    cairo_point_int_t max = { CAIRO_RECT_INT_MAX, CAIRO_RECT_INT_MAX };

Well, read it carefully... yeah.  That caused each show glyph operation
upload a mask the size of the surface.  With evince/poppler and certain
PDF files that each glyph is rendered in its own cairo_show_glyphs()
call, that meant a 20x slowdown in rendering a page of PDF.

If still wondering what's wrong with that change, here is the answer:

-    cairo_point_int_t min = { CAIRO_RECT_INT_MIN, CAIRO_RECT_INT_MIN };
-    cairo_point_int_t max = { CAIRO_RECT_INT_MAX, CAIRO_RECT_INT_MAX };
+    cairo_point_int_t min = { CAIRO_RECT_INT_MAX, CAIRO_RECT_INT_MAX };
+    cairo_point_int_t max = { CAIRO_RECT_INT_MIN, CAIRO_RECT_INT_MIN };

Yay for git-bisect.
2008-01-25 04:16:44 -05:00
Behdad Esfahbod
8983208f45 [configure.in] Require pixman >= 0.9.6
I was experiencing very weird rendering problems and crashes in evince with
pixman 0.9.4.  Upgrading to pixman 0.9.6 fixed the all.  Lets just require it.
2008-01-25 01:00:21 -05:00
Behdad Esfahbod
5dfe47a3f1 [cairo-scaled-font] Unbreak it after my recent commit
Sigh.
2008-01-25 00:35:11 -05:00
Behdad Esfahbod
efd3a96524 [cairo-scaled-font] Don't err on font size 0, really
First, seems like we were rejecting degenerate font matrix right away
at the constructor.  Don't do that.

Next, PS/PDF were inverting the font scale matrix, assuming that it's
invertible.  We now keep the inverse too, so they can use it.  For the
case of a size 0 font, both the scale matrix and its invert are set to
0,0,0,0.  That's safe, even if slightly inconsistent.
2008-01-24 23:35:06 -05:00
Behdad Esfahbod
45f269e330 [cairo-scaled-font] Oops, return err if not handling it 2008-01-24 22:39:28 -05:00
Behdad Esfahbod
6d0dc3e076 [cairo-scaled-font] Don't err on font size 0 2008-01-24 22:27:27 -05:00
Vladimir Vukicevic
ea9afecc9a [quartz] Do dynamic symbol lookups for 10.4/10.5 optimization symbols
The gcc-__attribute-__ based weak linking was causing all sorts of problems;
do dlsym lookups at runtime instead.
2008-01-24 11:48:02 -08:00
Vladimir Vukicevic
287de2ce58 [quartz] Clean up unused APIs a bit
The data parameter from get_image was never really used; get rid of it and clean up
callers.  Also get rid of a chunk of dead code in release_dest_image.
2008-01-24 11:32:27 -08:00
Vladimir Vukicevic
b96c6c26c2 [win32] Print non-black/white text correctly in show_glyphs 2008-01-24 11:24:02 -08:00
Vladimir Vukicevic
8e7c0db801 [win32] Better tracking of initial clip
There were a few corner cases that the win32 surface was failing
at when there was an initial clip set; the win32-printing surface
had more serious problems when painting meta surface patterns.
This cleans up the initial DC clip tracking for both surfaces.
2008-01-24 11:24:02 -08:00
Carl Worth
c05e3b08b4 Remove ROADMAP and TODO, mentioning their URLs in README
We're maintaining these as part of cairo's website now,
rather than as part of the source code.
2008-01-24 10:12:01 -08:00
Behdad Esfahbod
2182384277 [test] Minor fix for check-ref-dups rule 2008-01-23 15:07:26 -05:00
Behdad Esfahbod
e7c0a69dcb [test] Also check for reference images listed in Makefile.am but missing
in git, and if this is not a git checkout, in source directory.
2008-01-23 14:57:59 -05:00
Bertram Felgenhauer
188765c8e8 improve comments for the pixman transformation anchoring math. 2008-01-23 19:22:18 +01:00
Bertram Felgenhauer
b6c7236443 update reference images for some non-aa testcases 2008-01-23 18:09:20 +01:00
Bertram Felgenhauer
5a0b15d2c9 anchor pattern transformations at the pattern origin
This keeps the rounding errors due to the conversion to 16.16 fixed point
numbers small and improves cairo's translation invariance.
2008-01-23 18:02:02 +01:00
Vladimir Vukicevic
431e846c03 cairo_point_int32_t is really int32_t, not int16_t
Oops.
2008-01-22 16:30:37 -08:00
Vladimir Vukicevic
02970ac8cf Fix usage of cairo_rectangle_int16_t leading to memory corruption
cairo_rectangle_int16_t was being used in a number of places instead
of cairo_rectangle_int_t, which led to memory corruption when cairo was
using a fixed point format with a bigger space than 16.16 (such as 24.8).
2008-01-22 15:32:11 -08:00
Behdad Esfahbod
1109ccfb4e [ROADMAP] Add item: Make cairo-ft respect FC_FT_FACE pattern element 2008-01-22 17:44:47 -05:00
Behdad Esfahbod
5024650d4d [test] Only summarize check results for the tests tested! 2008-01-22 12:46:03 -05:00
Carl Worth
18181f12ae Make Carl return from his time-traveling expedition 2008-01-22 06:25:19 -08:00
Behdad Esfahbod
95f3b425e6 [cairo-path-stroke] Use M_SQRT2 for constant value 2008-01-22 01:03:02 -05:00
Behdad Esfahbod
1931ce1b3d [cairo-operator] Remove unused cairo-operator.c 2008-01-22 00:36:48 -05:00
Carl Worth
47cf7ed769 Test and document that fill rule has no effect on cairo_path_extents 2008-01-21 16:45:41 -08:00
Carl Worth
1ca186f511 Disable rectilinear stroke optimization for small miter limit values
This fixes the bug that was causing the recently added
rectilinear-miter-limit test case to fail. It passes
quite happily now.
2008-01-21 16:34:24 -08:00
Carl Worth
32efcc9462 Add new rectilinear-miter-limit test to demonstrate bug
We're failing to respect the miter limit in the rectilinear
stroke optimization code.
2008-01-21 16:32:48 -08:00
Carl Worth
326342962d Rename trailing_move_to_point to move_to_point
And prefer TRUE and FALSE literals over 1 and 0.
2008-01-21 15:20:07 -08:00
Carl Worth
c480eedbb5 Test and document extents of degenerate "dots"
It's a common idiom to stroke degenerate sub-paths made with
cairo_move_to(x,y);cairo_rel_line_to(0,0) to draw dots. Test
that we get the desired extents from cairo_fill_extents,
cairo_stroke_extents, and cairo_path_extents for these cases.

Also document that the cairo_path_extents result is equivalent
to the limit of stroking with CAIRO_LINE_CAP_ROUND, (so that
these "dot" points are included), as the line width
approaches 0.0 .
2008-01-21 14:56:21 -08:00
Carl Worth
55e0dddf04 Add cairo_path_extents testing to several cases missing it
With these degenerate shapes, cairo_path_extents still returns
a zero-area rectangle, but with a non-zero offset.
2008-01-21 14:45:06 -08:00
Carl Worth
63df3a82a3 Fix cairo_path_extents to ignore lone cairo_move_to points.
Update the documentation as well.
2008-01-21 13:47:05 -08:00
Carl Worth
c15cab8b68 Correct near-pangram to be an actual pangram
This wasn't affecting the test quality at all, but it did annoy
me to see this mistake.
2008-01-21 13:34:53 -08:00
Carl Worth
ed695bdb9b Define repeated string literal once 2008-01-21 13:33:46 -08:00
Carl Worth
80df194b77 Clarify documentation of cairo_{fill,stroke,path}_extents
Mostly just adding more cross-references between the documentation
of these three similar functions.
2008-01-21 12:14:49 -08:00
Brian Ewins
eba04b7fbc [path] use new interpret_flat infrastructure for path_populate
refactor to reduce duplication of flattening code.
2008-01-21 12:07:11 -08:00
Brian Ewins
3270ae6a65 [path] Use new interpret_flat infrastructure for path_count.
Refactor to reduce duplication of path flattening code.
2008-01-21 12:06:36 -08:00
Brian Ewins
4177208be6 [cairo] Add cairo_path_extents()
This new function gets the extents of the current path, whether
or not they would be inked by a 'fill'. It differs from
cairo_fill_extents() when the area enclosed by the path is 0.

Includes documentation and updated test.
2008-01-21 12:04:32 -08:00
Brian Ewins
d923457c0f [path-fixed] make _cairo_path_fixed_bounds use _cairo_path_fixed_interpret_flat
_cairo_path_fixed_bounds can use the new _interpret_flat mechanism; this
results in tighter bounds; previously the bounds followed the control
points of the beziers, whereas now they are the bounds of the curve.
2008-01-21 12:01:44 -08:00
Brian Ewins
1471b3f00a [path-fixed] add _cairo_path_fixed_interpret_flat
_cairo_path_fixed_interpret_flat flattens the path as it
interprets it, meaning that a curve_to callback is not
required.
2008-01-21 12:01:44 -08:00
Behdad Esfahbod
3339c32b0a [cairoint.h] Move MSC inline macros into cairo-compiler-private.h
where they belong
2008-01-20 02:56:26 -05:00
Behdad Esfahbod
ac17ce0f89 [cairo-fixed/wideint-private.h] Split out typedefs from prototypes
such that the type definitions can be used from boilerplate without exposing
the prototypes.
2008-01-20 02:55:07 -05:00
Peter Weilbacher
f072d815d4 [cairo-ft] Fix typo in comment 2008-01-19 20:54:25 -05:00
Peter Weilbacher
0fb800ff22 [cairo-ft] Add FC_PIXEL_SIZE as double, not int 2008-01-19 20:54:24 -05:00
Adrian Johnson
8887fb3593 Fix PS/PDF Type 1 font embedding when glyph 0 is used
cairo-scaled-fonts-subsets.c reserves position 0 in each subset for
glyph 0 (.notdef) as the font embedding of each font type requires
.notdef as the first glyph. For some reason this was done by reserving
the position then inserting glyph 0 in the collect function instead of
just adding the glyph to the hash table when the subset is
created. The problem this caused was that when an application called
show_glyphs() with glyph 0, the glyph was added to the hash table
(because it was not already there) resulting in two .notdef glyphs in
the subset. This resulted in breakage in the Type 1 subsetting where
the second .notdef was not emitted and all subsequent glyphs were
moved up one place resulting in incorrect font encoding in the PS/PDF
output.

Fix this by adding .notdef to the subset hash table when the subset is
created.

This fixes #13841.
2008-01-20 01:33:56 +10:30