Commit graph

2945 commits

Author SHA1 Message Date
Behdad Esfahbod
8fd7328ebb Don't call into backends if num_glyphs is zero (#5177)
Just return success in _cairo_scaled_font_show_glyphs() and
_cairo_surface_show_glyphs() if num_glyphs is zero.
2006-12-23 17:08:04 -05:00
Behdad Esfahbod
3212fc4f0f [cairo-scaled-font] Skip invisible glyphs (like space) in glyph_extents() (#9422)
When computing extents for an array of glyphs, just taking min/max of x/y for
the bounding box of each glyph doesn't work.  The reason being that an
invisible glyph (like the space glyph) should not modify the resulting
extents, but it will.  So now we skip invisible glyphs.
2006-12-23 17:00:00 -05:00
Brian Ewins
8368fa2fcf [test/text-rotate] Use the same text for measuring and printing 2006-12-23 15:44:16 -05:00
Brian Ewins
261d6b805c [ATSUI] Compute glyph extents from the bounding boxes of their paths (#9350) 2006-12-23 15:34:16 -05:00
Carl Worth
ee01bd9e17 Bump version to 1.3.11 after making 1.3.10 snapshot 2006-12-23 00:47:40 -08:00
Carl Worth
b35cfde7f0 Increment cairo version to 1.3.10 (and libtool versioning to 12:3:10) 2006-12-23 00:35:14 -08:00
Carl Worth
d6895af9f1 NEWS: Add notes for 1.3.10 snapshot 2006-12-23 00:29:21 -08:00
Carl Worth
f46fcd1847 Annoying template churn 2006-12-23 00:29:01 -08:00
Carl Worth
c08bd4ec37 Ignore another test case binary 2006-12-23 00:03:31 -08:00
Carl Worth
ba531642f7 Add optimization for rectilinear stroke
This custom stroking code allows backends to use optimized region-based
drawing operations for rectilinear strokes. This results in a 5-25x
performance improvement when drawing rectilinear shapes:

image-rgb          box-outline-stroke-100 0.18 -> 0.01: 25.58x speedup
████████████████████████▋
image-rgba         box-outline-stroke-100 0.18 -> 0.01: 25.57x speedup
████████████████████████▋
 xlib-rgb          box-outline-stroke-100 0.49 -> 0.06:  8.67x speedup
███████▋
 xlib-rgba         box-outline-stroke-100 0.22 -> 0.04:  5.39x speedup
████▍

In other words, using cairo_stroke instead of cairo_fill to draw the
same shape was 5-15x slower before, but is 1.2-2x faster now.
2006-12-22 17:59:20 -08:00
Carl Worth
b118911853 Put ft-text-vertical-layout-type1 back on the XFAIL list
I must not have the right font available, (test result is coming out
looking like the result of ft-text-vertical-layout-type3, Vera?).

We should switch this test to load a bundled font, (should do that for
all font-using tests, too).
2006-12-22 17:59:20 -08:00
Carl Worth
7b1509f4f3 Reimplement path.has_current point as a 1-bit bitfield 2006-12-22 17:59:20 -08:00
Carl Worth
9d2d3b95e3 Add new rectilinear-stroke test
This is in preparation for an optimized implementation of cairo_stroke
for rectilinear paths.
2006-12-22 17:59:20 -08:00
Jinghua Luo
39ce31ade6 Glitz: fix a potential use after free bug in _cairo_glitz_surface_old_show_glyphs.
There is a race condition between glyph unlocking and glyph cache thawing.
Moving down _cairo_scaled_font_thaw_cache a few lines fixes the problem and make
crashes go away.
2006-12-22 22:05:20 +08:00
Behdad Esfahbod
344901a1a1 [test] Fix typo in test comment, again 2006-12-20 18:15:22 -05:00
Carl Worth
473ae3aa95 Rename remaining cairo_path_data to cairo_path in function names, etc. 2006-12-19 13:10:14 -08:00
Carl Worth
def0e6d41d Rename cairo-path-data.c to cairo-path.c (and similar) 2006-12-19 13:10:06 -08:00
Carl Worth
13c143bb52 Rename cairo-path.c to cairo-path-fixed.c 2006-12-19 13:10:00 -08:00
Carl Worth
267afe7be3 test/.gitignore: Ignore binarries for some recently added tests 2006-12-18 16:05:42 -08:00
Brian Ewins
f3b9f486cd [ATSUI] Use screen metrics instead of ideal metrics to compute glyph extents
The glyph extent computation was totally busted.  It was using "logical"
extents and it was not correctly handling rotations, etc.  It all looks a lot
better now.
2006-12-17 22:26:02 -05:00
Behdad Esfahbod
c6ec6ed696 [tests/ft-text-vertical-layout-type3] Remove comment that this emits Type3 font
This test used to be named -truetype, which reflected the type of font used in
the test, in contrast to the -type1 test that uses a Type1 font.  However, we
renamed this test to -type3 to emphasize the fact that a TrueType subset is
not emitted for vertical fonts and a Type3 fallback font is generated.

Now things have changed: we try generating a Type1 fallback font which is what
is happening for this test.  Moreover, the -typ1 test also is generating a
Type1 fallback font since the Type1 subset font is not useful for vertical
fonts.
2006-12-17 18:42:05 -05:00
Behdad Esfahbod
50efd71935 [type1-subset] Return UNSUPPORTED for vertical fonts
This fixes the last problem with vertical fonts in PS/PDF.  As such, remove
ft-text-vertical-layout-type1 test from XFAIL and add PS-specific ref image
to pass.
2006-12-17 18:37:01 -05:00
Behdad Esfahbod
207e38e8ba [PS] Fix typo in comment emitted for Type1 fallback font subsets 2006-12-17 18:25:48 -05:00
Behdad Esfahbod
0bea2ce7f7 [pdiff] Define _GNU_SOURCE to get correct symbols out of <math.h>
math.h does not define __USE_ISOC99 otherwise.
2006-12-17 14:32:08 -05:00
Behdad Esfahbod
2ca6a767ee [pdiff] Don't use float math functions if not using gcc with C99
The float version of many math functions were introduced in C99, and were
causing compile failure on systems like OS X.  We now define them to their
double variant if __USE_ISOC99 is not defined.  We may want to expand it later
to cover non-gcc compilers too, but since this is pdiff only, it's not really
important.
2006-12-17 14:24:57 -05:00
Behdad Esfahbod
0d9b2d0415 [configure] Use AC_C_INLINE to correctly define inline
Previously we were defining a symbol INLINE and use that in one place, while
other places were using straight inline.  With the AC_C_INLINE macro we can
just leave it to autoconf to correctly choose what inline should be defined
to.
2006-12-17 14:09:15 -05:00
Behdad Esfahbod
294d1a3c4e [test] Add ft-text-vertical-layout-type3-ps-argb32-ref.png
The PS output for ft-text-vertical-layout-type3 looks correct, except for some
antialiasing mismatch.  Ading ref image to fix this, and so, remove the test
from XFAIL.
2006-12-17 01:07:41 -05:00
Behdad Esfahbod
cab3f84ad3 [test] Fix typo in test comment 2006-12-16 18:48:59 -05:00
Behdad Esfahbod
46add53973 [cairo-gstate] Don't bypass glyph transformation if font_matrix has translation (#9365)
We have tests for this (ft-text-vertical-*), but unfortunately they didn't
prevent the regression here because they have been marked XFAIL, since we didn't
quite fix them for PS.
2006-12-16 18:46:54 -05:00
Behdad Esfahbod
57589a9049 [pdiff] Use CAIRO_CFLAGS, to make sure warnings are enabled 2006-12-16 18:18:47 -05:00
Behdad Esfahbod
8f2ad0affd [pdiff] Fix compiler warnings, that were causing crashes 2006-12-16 18:16:46 -05:00
Brian Ewins
be6edd64a3 [ATSUI] Round glyph locations to nearest pixel
This is what cairo_scaled_font_show_glyphs() does, as well as backends like
xlib and win32.
2006-12-16 15:43:46 -05:00
Brian Ewins
bf1c2ef1e2 [ATSUI] Support disabling antialiased text 2006-12-16 15:41:09 -05:00
M Joonas Pihlaja
4c95e2b7bf New performance test case "mosaic" for splines. 2006-12-16 21:32:19 +02:00
Frederic Crozat
fe21f9d8ca [check-defs.sh] Fix make check for OPD platforms
Make symbol checks work on OPD platform (such as IA64 or PPC64).
2006-12-16 13:55:21 -05:00
Carl Worth
fa618df6e2 Merge branch 'master' of git.cairographics.org:/git/cairo into cairo 2006-12-14 21:10:34 -08:00
Carl Worth
2b946cba0e Bump cairo version to 1.3.9 after making 1.3.8 snapshot 2006-12-14 21:09:45 -08:00
Carl Worth
129b55f5fc Increment cairo version to 1.3.8 (and libtool versioning to 12:2:10) 2006-12-14 20:44:25 -08:00
Carl Worth
8fa86e8970 NEWS: Add notes for cairo 1.3.8 snapshot 2006-12-14 20:43:31 -08:00
Jonathan Watt
81a620fb66 revert accidental mode changes in my previous commit 2006-12-15 04:52:28 +01:00
U-JONATHAN-X60S\jonathan
15e8486ef1 Merge branch 'master' of git://git.cairographics.org/git/cairo 2006-12-15 02:31:13 +01:00
U-JONATHAN-X60S\jonathan
bf78be63fc Fix a couple of character spacing issues on Windows 2006-12-15 00:48:54 +01:00
Carl Worth
8b31038b9f Fix a couple of more stale images holding up 'make distcheck' 2006-12-14 10:16:34 -08:00
David Turner
e9bef30d2b Optimize gradient computations
We update the test suite reference images where needed, (pdiff
avoided a few, but most still needed updating). We take advantage
of the need for new reference images to shrink some of the giant
tests to speed them up a bit.

This optimization provides a 2x improvement in linear gradient
generation performance (numbers from an x86 laptop):

image-rgb    paint_linear_rgba_source-512 26.13 -> 11.13: 2.35x speedup
█▍
image-rgb    paint_linear_rgba_source-256  6.47 ->  2.76: 2.34x speedup
█▍
image-rgba      paint_linear_rgb_over-256  6.51 ->  2.86: 2.28x speedup
█▎
image-rgb      paint_linear_rgba_over-512 28.62 -> 13.70: 2.09x speedup
█▏
image-rgba       fill_linear_rgb_over-256  3.24 ->  1.94: 1.66x speedup
▋
image-rgb     stroke_linear_rgba_over-256  5.68 ->  4.10: 1.39x speedup
▍
2006-12-14 09:27:45 -08:00
Carl Worth
af9cce6aa2 Fix 'make distcheck' after recent file removals 2006-12-14 09:18:26 -08:00
Carl Worth
4888a02666 test: Remove ps-specific reference images no longer needed thanks to pdiff 2006-12-14 07:58:02 -08:00
Carl Worth
5e0818d79d test: Remove svg-specific reference images no longer needed thanks to pdiff
This doesn't get rid of all the SVG reference images, but it
does clean up quite a few.
2006-12-14 07:58:02 -08:00
Carl Worth
c426e71141 Hook up pdiff to the test suite now that its written in C 2006-12-14 07:58:02 -08:00
Carl Worth
305cbd8e71 pdiff: Remove casts since we're out of the land of X++ where void* is stupidly broken 2006-12-14 07:58:01 -08:00
Carl Worth
f175b23559 pdiff: Rename everything to .c and fix an last littele C++ isms.
The only things we had missed were a few new/delete pairs, and some
obvious header file fixups, (like not doing <string>).
2006-12-14 07:58:01 -08:00