Commit graph

6665 commits

Author SHA1 Message Date
Chris Wilson
931556005a [trace] Remove the forced switching to C locale
This interferes with the application being traced. It is not clear from
printf(3) whether "%.f" is locale dependent or not - but until we have a
failure do not break applications unnecessarily!
2009-01-02 09:53:22 +00:00
Chris Wilson
d0f41b92bf [trace] Do not force the output filename.
Handle the case of tracing an application that spawns it own graphical
children but using the autonaming facility within cairo-trace. Currently
the traced process tree would all attempt to write to the same file,
creating a broken trace. This means sacrificing the display of the output
name, but allows use for a wider range of applications.
2009-01-02 09:53:21 +00:00
Chris Wilson
19e8c5c7f4 [test] Fix mismatched free.
A couple of strings allocated using glib functions but freed with system
malloc.

Reported: http://bugs.freedesktop.org/show_bug.cgi?id=19210.
2009-01-02 09:53:21 +00:00
Chris Wilson
6662eede2a [perf] Fix errors reported by cppcheck
Trivial mistakes, identified in bugs
http://bugs.freedesktop.org/show_bug.cgi?id=19206 and
http://bugs.freedesktop.org/show_bug.cgi?id=19207.
2009-01-02 09:53:20 +00:00
Chris Wilson
8419c4f124 [perf] Correct another reference to '<cairo>'
I think that's the last use of the old internal name for twin!
2009-01-02 09:53:20 +00:00
Behdad Esfahbod
14d94d9354 Fix various README typos 2009-01-02 02:56:38 -05:00
Behdad Esfahbod
28a72648ba [gstate] Change the glyph dropping safety margin from 2em to 10em
The small margin caused bugs with math fonts.  See:
https://bugzilla.mozilla.org/show_bug.cgi?id=460023
2008-12-30 13:48:47 -05:00
Chris Wilson
fa63c43532 [spline] Be pedantic and propagate errors.
We know that the current users will always return SUCCESS, but propagate
the status return for future users.
2008-12-29 16:11:29 +00:00
Chris Wilson
7df082dd8a [test] Update twin reference images
Subsequent to recent tweaks, update the reference images for twin.
2008-12-29 16:08:12 +00:00
Chris Wilson
e10af38799 make "make check" happy again
Add the missing scoping that caused check-plt to complain.
2008-12-29 12:55:10 +00:00
Chris Wilson
0100856226 [path] Remove tolerance from path bounders
With Behdad's analytical analysis of the spline bbox, tolerance is now
redundant for the path extents and the approximate bounds, so remove it
from the functions parameters.
2008-12-29 12:55:09 +00:00
Chris Wilson
84b81388be [test] Draw spline bbox
Add the stroked extents to the spline-decomposition test.
2008-12-29 12:55:05 +00:00
Behdad Esfahbod
efb1716090 [_cairo_spline_bound] Protect against b == 0 2008-12-28 16:06:27 -05:00
Behdad Esfahbod
0b59e29004 [_cairo_spline_bound] Simplify condition 2008-12-28 02:49:39 -05:00
Behdad Esfahbod
3bf1b7d574 [_cairo_spline_bound] Fix the check for feasible solutions
Also make it more strict.  The only times we call sqrt now is
when a solution in (0,1) exists.
2008-12-28 02:41:39 -05:00
Behdad Esfahbod
7f840d156c [spline] Save a couple more muls 2008-12-28 02:02:30 -05:00
Behdad Esfahbod
3292f9906b [spline] Do some checks to avoid calling sqrt() if no feasible solution exists 2008-12-28 01:59:12 -05:00
Behdad Esfahbod
efe4d2ce99 [spline] Simplify code 2008-12-28 01:22:40 -05:00
Behdad Esfahbod
8672178bf6 [spline] Remove duplicated code by using a macro 2008-12-28 01:20:37 -05:00
Behdad Esfahbod
ef0f6c3ca3 [spline] Add an analytical bounder for splines
The way this works is very simple:  Once for X, and once for Y, it
takes the derivative of the bezier equation, equals it to zero and
solves to find the extreme points, and if the extreme points are
interesting, adds them to the bounder.

Not the fastest algorithm out there, but my estimate is that if
_de_casteljau() ends up breaking a stroke in at least 10 pieces,
then the new bounder is faster.  Would be good to see some real
perf data.
2008-12-27 23:44:58 -05:00
Behdad Esfahbod
f2f62c7c44 [twin] Micro-optimize 2008-12-27 16:25:51 -05:00
Chris Wilson
50bc2bc017 [path] Simply track the current point for bounds.
The idea is to track always update the current point, but not add it
during a move-to.
2008-12-27 11:46:24 +00:00
Chris Wilson
078ebb01ba [path] Initialise spline from current point
Joonas spotted that the breakage with the curve bounds was the result of
initialising the spline using the original move to point and not the
current point.

Fixes: Bug 19256 Gnome Foot in gnome-games rendered incorrectly
(https://bugs.freedesktop.org/show_bug.cgi?id=19256)
2008-12-27 11:34:31 +00:00
Chris Wilson
4320ea6887 [trace] Fix up positional arguments
James Cloos pointed out that the correct form to use is "$@" when
executing the command line.
2008-12-27 11:34:31 +00:00
Chris Wilson
e76a676c8f [twin] Trivial spelling correction.
This ain't no decadent descendent of the Hershey font...
2008-12-27 11:34:31 +00:00
Behdad Esfahbod
9332c0a8ea [util] Add waterfall 2008-12-26 16:38:26 -05:00
Behdad Esfahbod
ab1febbf22 [twin] Resnap margin under monospace 2008-12-26 16:37:06 -05:00
Behdad Esfahbod
3c91d9f5a2 [twin] Adjust margins 2008-12-26 16:30:01 -05:00
Behdad Esfahbod
0b5c60bae1 [twin] Clean up hinting 2008-12-26 15:49:28 -05:00
Behdad Esfahbod
6e7a2c4ce3 [twin] Fix monospace for narrow glyphs 2008-12-26 15:41:13 -05:00
Behdad Esfahbod
e8e6ae1294 [twin] Cache pen and other properties on the scaled font 2008-12-26 15:17:15 -05:00
Behdad Esfahbod
e133cc1446 [twin] Don't stretch pen 2008-12-26 14:56:32 -05:00
Behdad Esfahbod
dec4d791f4 [twin] Minor shuffling 2008-12-26 14:56:23 -05:00
Behdad Esfahbod
c3de08ee2f [twin] Further reduce weight 2008-12-26 14:11:52 -05:00
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