[cairo-commit] 6 commits - .gitignore Makefile.am perf/cairo-perf.c perf/cairo-perf.h perf/Makefile.am perf/twin.c src/cairo-font-face.c src/cairoint.h test/.gitignore test/Makefile.am test/twin.c test/twin-ps2-ref.png test/twin-ps3-ref.png test/twin-svg11-ref.png test/twin-svg12-ref.png

Carl Worth cworth at kemper.freedesktop.org
Wed Oct 29 16:41:10 PDT 2008


 .gitignore            |    2 +
 Makefile.am           |    4 ++-
 dev/null              |binary
 perf/Makefile.am      |    1 
 perf/cairo-perf.c     |    1 
 perf/cairo-perf.h     |    1 
 perf/twin.c           |   50 -----------------------------------------
 src/cairo-font-face.c |    6 +----
 src/cairoint.h        |    1 
 test/.gitignore       |    1 
 test/Makefile.am      |   15 +++++++++---
 test/twin.c           |   60 --------------------------------------------------
 12 files changed, 18 insertions(+), 124 deletions(-)

New commits:
commit e0046aaf417a61da008dc6374871fa3687ba94ab
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Oct 29 16:25:00 2008 -0700

    Remove twin perf case.
    
    This performance test relied on the recently-removed ability
    to select the internal twin-based font family with a name of
    "cairo".
    
    Presumably, we'll want to bring this performance case back when
    some other means of requesting that font face is added.

diff --git a/perf/Makefile.am b/perf/Makefile.am
index daec8e4..3ac13a6 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -35,7 +35,6 @@ cairo_perf_SOURCES =		\
 	subimage_copy.c		\
 	tessellate.c		\
 	text.c			\
-	twin.c			\
 	unaligned-clip.c	\
 	world-map.c		\
 	world-map.h		\
diff --git a/perf/cairo-perf.c b/perf/cairo-perf.c
index a6d59a5..613d15c 100644
--- a/perf/cairo-perf.c
+++ b/perf/cairo-perf.c
@@ -458,6 +458,5 @@ const cairo_perf_case_t perf_cases[] = {
     { rounded_rectangles, 512, 512},
     { long_dashed_lines, 512, 512},
     { composite_checker, 16, 512},
-    { twin, 800, 800},
     { NULL }
 };
diff --git a/perf/cairo-perf.h b/perf/cairo-perf.h
index 0cedb69..57fe85f 100644
--- a/perf/cairo-perf.h
+++ b/perf/cairo-perf.h
@@ -172,6 +172,5 @@ CAIRO_PERF_DECL (rectangles);
 CAIRO_PERF_DECL (rounded_rectangles);
 CAIRO_PERF_DECL (long_dashed_lines);
 CAIRO_PERF_DECL (composite_checker);
-CAIRO_PERF_DECL (twin);
 
 #endif
diff --git a/perf/twin.c b/perf/twin.c
deleted file mode 100644
index d81c2af..0000000
--- a/perf/twin.c
+++ /dev/null
@@ -1,50 +0,0 @@
-#define WIDTH 1350
-#define HEIGHT 900
-
-#include "cairo-perf.h"
-
-static cairo_perf_ticks_t
-do_twin (cairo_t *cr,
-	 int width,
-	 int height)
-{
-    int i, j, h;
-    unsigned char s[2] = {0, 0};
-
-    cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
-    cairo_paint (cr);
-    cairo_set_source_rgb (cr, 0, 0, 0);
-
-    cairo_perf_timer_start ();
-
-    cairo_select_font_face (cr,
-			    "cairo",
-			    CAIRO_FONT_SLANT_NORMAL,
-			    CAIRO_FONT_WEIGHT_NORMAL);
-
-    h = 2;
-    for (i = 8; i < 48; i >= 24 ? i+=3 : i++) {
-	cairo_set_font_size (cr, i);
-	for (j = 33; j < 128; j++) {
-	    if (j == 33 || (j == 80 && i > 24)) {
-		h += i + 2;
-		cairo_move_to (cr, 10, h);
-	    }
-	    s[0] = j;
-	    cairo_text_path (cr, (const char *) s);
-	}
-    }
-    cairo_fill (cr);
-
-    cairo_perf_timer_stop ();
-    return cairo_perf_timer_elapsed ();
-}
-
-void
-twin (cairo_perf_t *perf,
-      cairo_t      *cr,
-      int           width,
-      int           height)
-{
-    cairo_perf_run (perf, "twin", do_twin);
-}
commit 292233685534aed712dfd45e8ccf498b792ce496
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Oct 29 16:25:00 2008 -0700

    Remove twin test case.
    
    This test relied on the recently-removed ability to select
    the internal twin-based font family with a name of "cairo".
    
    Presumably, we'll want to bring this test case back when
    some other means of requesting that font face is added.

diff --git a/test/.gitignore b/test/.gitignore
index 889af83..9c8995d 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -232,7 +232,6 @@ transforms
 translate-show-surface
 trap-clip
 truetype-tables
-twin
 unantialiased-shapes
 unbounded-operator
 user-data
diff --git a/test/Makefile.am b/test/Makefile.am
index ac495b5..eaeff9a 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -180,7 +180,6 @@ transforms$(EXEEXT)					\
 translate-show-surface$(EXEEXT)				\
 trap-clip$(EXEEXT)					\
 truetype-tables$(EXEEXT)				\
-twin$(EXEEXT)						\
 unantialiased-shapes$(EXEEXT)				\
 unbounded-operator$(EXEEXT)				\
 user-data$(EXEEXT)					\
@@ -930,11 +929,6 @@ REFERENCE_IMAGES = \
 	trap-clip-pdf-rgb24-ref.png \
 	trap-clip-ps2-argb32-ref.png \
 	trap-clip-ps2-rgb24-ref.png \
-	twin-ref.png \
-	twin-ps2-ref.png \
-	twin-ps3-ref.png \
-	twin-svg11-ref.png \
-	twin-svg12-ref.png \
 	unantialiased-shapes-ref.png	\
 	unantialiased-shapes-quartz-ref.png \
 	unbounded-operator-ref.png	\
diff --git a/test/twin-ps2-ref.png b/test/twin-ps2-ref.png
deleted file mode 100644
index a58dc5b..0000000
Binary files a/test/twin-ps2-ref.png and /dev/null differ
diff --git a/test/twin-ps3-ref.png b/test/twin-ps3-ref.png
deleted file mode 100644
index a58dc5b..0000000
Binary files a/test/twin-ps3-ref.png and /dev/null differ
diff --git a/test/twin-svg11-ref.png b/test/twin-svg11-ref.png
deleted file mode 100644
index 5b7d67d..0000000
Binary files a/test/twin-svg11-ref.png and /dev/null differ
diff --git a/test/twin-svg12-ref.png b/test/twin-svg12-ref.png
deleted file mode 100644
index 5b7d67d..0000000
Binary files a/test/twin-svg12-ref.png and /dev/null differ
diff --git a/test/twin.c b/test/twin.c
deleted file mode 100644
index d114b86..0000000
--- a/test/twin.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2008 Chris Wilson
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of
- * Chris Wilson not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission. Chris Wilson makes no representations about the
- * suitability of this software for any purpose.  It is provided "as
- * is" without express or implied warranty.
- *
- * CHRIS WILSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL CHRIS WILSON BE LIABLE FOR ANY SPECIAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Chris Wilson <chris at chris-wilson.co.uk>
- */
-
-#include "cairo-test.h"
-
-static cairo_test_draw_function_t draw;
-
-static const cairo_test_t test = {
-    "twin",
-    "Tests the internal font",
-    128, 20,
-    draw
-};
-
-static cairo_test_status_t
-draw (cairo_t *cr, int width, int height)
-{
-    cairo_set_source_rgb (cr, 1, 1, 1);
-    cairo_paint (cr);
-    cairo_set_source_rgb (cr, 0, 0, 0);
-
-    cairo_select_font_face (cr,
-			    "cairo",
-			    CAIRO_FONT_SLANT_NORMAL,
-			    CAIRO_FONT_WEIGHT_NORMAL);
-    cairo_set_font_size (cr, 16);
-
-    cairo_move_to (cr, 4, 14);
-    cairo_show_text (cr, "Is cairo's twin giza?");
-
-    return CAIRO_TEST_SUCCESS;
-}
-
-int
-main (void)
-{
-    return cairo_test (&test);
-}
commit a824d284be23793a5c48b9ae833dcb7b2d5fff80
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Oct 29 16:21:42 2008 -0700

    Remove the ability to select the internal font face with a name of "cairo".
    
    It's not fair to steal this name from the namespace of family names.
    There are definitely cairo.ttf files that exist out there, and people
    may already be using these, (or may use them in the future), with
    cairo_select_font_face and a family name of "cairo".
    
    In place of this, we'll want to come up with some other new, and
    documented API for selecting the internal font face.

diff --git a/src/cairo-font-face.c b/src/cairo-font-face.c
index 6cea395..30c8d9f 100644
--- a/src/cairo-font-face.c
+++ b/src/cairo-font-face.c
@@ -578,8 +578,7 @@ _cairo_toy_font_face_scaled_font_get_implementation (void                *abstra
     if (font_face->base.status)
 	return font_face->base.status;
 
-    if (CAIRO_SCALED_FONT_BACKEND_DEFAULT != &_cairo_user_scaled_font_backend &&
-	0 != strcmp (font_face->family, CAIRO_USER_FONT_FAMILY_DEFAULT))
+    if (CAIRO_SCALED_FONT_BACKEND_DEFAULT != &_cairo_user_scaled_font_backend)
     {
 	const cairo_scaled_font_backend_t * backend = CAIRO_SCALED_FONT_BACKEND_DEFAULT;
 
@@ -618,8 +617,7 @@ _cairo_toy_font_face_scaled_font_create (void                *abstract_font_face
     if (status)
 	return status;
 
-    if (CAIRO_SCALED_FONT_BACKEND_DEFAULT != &_cairo_user_scaled_font_backend &&
-	0 != strcmp (font_face->family, CAIRO_USER_FONT_FAMILY_DEFAULT))
+    if (CAIRO_SCALED_FONT_BACKEND_DEFAULT != &_cairo_user_scaled_font_backend)
     {
 	const cairo_scaled_font_backend_t * backend = CAIRO_SCALED_FONT_BACKEND_DEFAULT;
 
diff --git a/src/cairoint.h b/src/cairoint.h
index a1d3f3d..a00e6e1 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -938,7 +938,6 @@ typedef struct _cairo_traps {
 #define CAIRO_WIN32_FONT_FAMILY_DEFAULT "Arial"
 #define CAIRO_QUARTZ_FONT_FAMILY_DEFAULT  "Helvetica"
 #define CAIRO_FT_FONT_FAMILY_DEFAULT     ""
-#define CAIRO_USER_FONT_FAMILY_DEFAULT     "cairo"
 
 #if   CAIRO_HAS_WIN32_FONT
 
commit f039da8d9172a6fb60082901c8dc56c7159ecd24
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Oct 29 16:17:24 2008 -0700

    Add doltcompile and doltlibtool to .gitignore.
    
    These generated files were recently added to our build system.
    We definitely don't want to see them in git-status output.

diff --git a/.gitignore b/.gitignore
index 09cd963..6719acc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,8 @@ config.log
 config.status
 configure
 configure.scan
+doltcompile
+doltlibtool
 libtool
 releases
 stamp-h
commit 81439b3bc8656b34c13b3cc7b5b6a9f03a3c8c54
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Oct 29 16:15:12 2008 -0700

    Add missing files to CLEANFILES and DISTCLEANFILES.
    
    Without these files in these lists, "make distcheck" is unhappy.

diff --git a/Makefile.am b/Makefile.am
index c36cfbb..223ceec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,7 +53,9 @@ EXTRA_DIST += \
 	cairo-version.h \
 	$(NULL)
 
-DISTCLEANFILES += config.cache
+DISTCLEANFILES += config.cache	\
+		  doltlibtool	\
+		  doltcompile
 MAINTAINERCLEANFILES += \
 	$(srcdir)/aclocal.m4 \
 	$(srcdir)/autoscan.log \
diff --git a/test/Makefile.am b/test/Makefile.am
index ec16ac4..ac495b5 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1198,9 +1198,18 @@ CLEANFILES +=					\
 	index.html				\
 	ref.hash				\
 	png-test.png				\
+	create-for-stream.pdf			\
+	create-for-stream.ps			\
+	create-for-stream.svg			\
 	svg-surface-source.svg			\
 	pdf-surface-source.pdf			\
 	ps-surface-source.ps			\
+	pdf-features.pdf			\
+	ps-features.ps				\
+	svg-clip.svg				\
+	svg-surface.svg				\
+	multi-page.pdf				\
+	multi-page.ps				\
 	$(NULL)
 
 # This used to be a simple 'echo ${RM} *.ps *.pdf *.svg *.etc', but
commit dd0416f5d47a946498219616f53abdad81d4fc38
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Oct 28 18:01:09 2008 -0700

    Add recently added reference images to REFERENCE_IMAGES list.
    
    This is just part of the make-distcheck routine for me. I know
    Behdad added a test to check for missing images in the list, but
    it doesn't seem to be getting run automatically as part of
    'make test' nor 'make distcheck', (or if it it, then I'm not
    noticing its output).

diff --git a/test/Makefile.am b/test/Makefile.am
index 17bcffd..ec16ac4 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -928,9 +928,13 @@ REFERENCE_IMAGES = \
 	trap-clip-rgb24-ref.png	\
 	trap-clip-pdf-argb32-ref.png \
 	trap-clip-pdf-rgb24-ref.png \
+	trap-clip-ps2-argb32-ref.png \
+	trap-clip-ps2-rgb24-ref.png \
 	twin-ref.png \
 	twin-ps2-ref.png \
 	twin-ps3-ref.png \
+	twin-svg11-ref.png \
+	twin-svg12-ref.png \
 	unantialiased-shapes-ref.png	\
 	unantialiased-shapes-quartz-ref.png \
 	unbounded-operator-ref.png	\


More information about the cairo-commit mailing list