[cairo-commit] 9 commits - doc/public src/cairo-beos.h src/cairo.c src/cairo-debug.c src/cairo-directfb.h src/cairo-font-face.c src/cairo-ft.h src/cairo-ft-private.h src/cairo-glitz.h src/cairo-gstate.c src/cairo.h src/cairoint.h src/cairo-misc.c src/cairo-mutex-impl-private.h src/cairo-mutex-type-private.h src/cairo-os2.h src/cairo-os2-private.h src/cairo-pdf.h src/cairo-ps.h src/cairo-quartz-font.c src/cairo-quartz.h src/cairo-quartz-image.h src/cairo-quartz-private.h src/cairo-scaled-font.c src/cairo-surface.c src/cairo-svg.h src/cairo-win32-font.c src/cairo-win32.h src/cairo-win32-private.h src/cairo-xcb.h src/cairo-xcb-xrender.h src/cairo-xlib.h src/cairo-xlib-xrender.h
Behdad Esfahbod
behdad at kemper.freedesktop.org
Mon Jun 23 14:56:59 PDT 2008
doc/public/Headers.mk | 2 +
doc/public/tmpl/cairo-status.sgml | 1
doc/public/tmpl/cairo-user-fonts.sgml | 2 -
src/cairo-beos.h | 2 -
src/cairo-debug.c | 6 ++---
src/cairo-directfb.h | 2 -
src/cairo-font-face.c | 2 -
src/cairo-ft-private.h | 4 +--
src/cairo-ft.h | 2 -
src/cairo-glitz.h | 2 -
src/cairo-gstate.c | 4 +--
src/cairo-misc.c | 2 +
src/cairo-mutex-impl-private.h | 2 -
src/cairo-mutex-type-private.h | 2 -
src/cairo-os2-private.h | 2 -
src/cairo-os2.h | 2 -
src/cairo-pdf.h | 2 -
src/cairo-ps.h | 2 -
src/cairo-quartz-font.c | 4 +--
src/cairo-quartz-image.h | 2 -
src/cairo-quartz-private.h | 2 -
src/cairo-quartz.h | 2 -
src/cairo-scaled-font.c | 15 +++++++++++++
src/cairo-surface.c | 1
src/cairo-svg.h | 2 -
src/cairo-win32-font.c | 8 +++---
src/cairo-win32-private.h | 4 +--
src/cairo-win32.h | 2 -
src/cairo-xcb-xrender.h | 2 -
src/cairo-xcb.h | 2 -
src/cairo-xlib-xrender.h | 2 -
src/cairo-xlib.h | 2 -
src/cairo.c | 39 +++++++++++++++++++++++++++++++---
src/cairo.h | 8 ++++--
src/cairoint.h | 12 +++++-----
35 files changed, 103 insertions(+), 49 deletions(-)
New commits:
commit f32090fb34f93d42bd134ee7c007f60dd1cd1c13
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jun 23 17:56:28 2008 -0400
Return CAIRO_STATUS_NEGATIVE_COUNT if num_glyphs is negative
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index ca42d92..acc72ea 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -1179,6 +1179,12 @@ cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
if (num_glyphs == 0)
return;
+ if (num_glyphs < 0) {
+ cairo_status_t status = _cairo_error (CAIRO_STATUS_NEGATIVE_COUNT);
+ /* XXX Can't propagate error */
+ return;
+ }
+
if (glyphs == NULL) {
cairo_status_t status = _cairo_error (CAIRO_STATUS_NULL_POINTER);
/* XXX Can't propagate error */
diff --git a/src/cairo.c b/src/cairo.c
index e8e2f4a..2fb5fc1 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -3045,6 +3045,11 @@ cairo_glyph_extents (cairo_t *cr,
if (num_glyphs == 0)
return;
+ if (num_glyphs < 0) {
+ _cairo_set_error (cr, CAIRO_STATUS_NEGATIVE_COUNT);
+ return;
+ }
+
if (glyphs == NULL) {
_cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
return;
@@ -3153,6 +3158,11 @@ cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
if (num_glyphs == 0)
return;
+ if (num_glyphs < 0) {
+ _cairo_set_error (cr, CAIRO_STATUS_NEGATIVE_COUNT);
+ return;
+ }
+
if (glyphs == NULL) {
_cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
return;
@@ -3262,6 +3272,11 @@ cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
if (num_glyphs == 0)
return;
+ if (num_glyphs < 0) {
+ _cairo_set_error (cr, CAIRO_STATUS_NEGATIVE_COUNT);
+ return;
+ }
+
if (glyphs == NULL) {
_cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
return;
commit 498f3ddf2e8f6b7c381c7153cbd39fa22c32ceea
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jun 23 17:53:25 2008 -0400
Add status CAIRO_STATUS_NEGATIVE_COUNT
To be used for things like passing a negative number of glyphs
to cairo_show_glyphs().
diff --git a/doc/public/tmpl/cairo-status.sgml b/doc/public/tmpl/cairo-status.sgml
index 143ce81..f88befe 100644
--- a/doc/public/tmpl/cairo-status.sgml
+++ b/doc/public/tmpl/cairo-status.sgml
@@ -66,6 +66,7 @@ code is required before or after each individual cairo function call.
@CAIRO_STATUS_FONT_TYPE_MISMATCH:
@CAIRO_STATUS_USER_FONT_IMMUTABLE:
@CAIRO_STATUS_USER_FONT_ERROR:
+ at CAIRO_STATUS_NEGATIVE_COUNT:
<!-- ##### FUNCTION cairo_status_to_string ##### -->
<para>
diff --git a/doc/public/tmpl/cairo-user-fonts.sgml b/doc/public/tmpl/cairo-user-fonts.sgml
index 64f7501..1a9322a 100644
--- a/doc/public/tmpl/cairo-user-fonts.sgml
+++ b/doc/public/tmpl/cairo-user-fonts.sgml
@@ -9,13 +9,11 @@ User Fonts
</para>
-
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
-
<!-- ##### SECTION Stability_Level ##### -->
diff --git a/src/cairo-misc.c b/src/cairo-misc.c
index 02c8873..e2b7cf7 100644
--- a/src/cairo-misc.c
+++ b/src/cairo-misc.c
@@ -107,6 +107,8 @@ cairo_status_to_string (cairo_status_t status)
return "the user-font is immutable";
case CAIRO_STATUS_USER_FONT_ERROR:
return "error occurred in a user-font callback function";
+ case CAIRO_STATUS_NEGATIVE_COUNT:
+ return "negative number used where it is not allowed";
}
return "<unknown error status>";
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index e35cd1d..f5a2f2f 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2579,6 +2579,7 @@ _cairo_surface_create_in_error (cairo_status_t status)
case CAIRO_STATUS_FONT_TYPE_MISMATCH:
case CAIRO_STATUS_USER_FONT_IMMUTABLE:
case CAIRO_STATUS_USER_FONT_ERROR:
+ case CAIRO_STATUS_NEGATIVE_COUNT:
default:
_cairo_error_throw (CAIRO_STATUS_NO_MEMORY);
return (cairo_surface_t *) &_cairo_surface_nil;
diff --git a/src/cairo.h b/src/cairo.h
index 6010697..3954159 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -206,6 +206,7 @@ typedef struct _cairo_user_data_key {
* @CAIRO_STATUS_FONT_TYPE_MISMATCH: the font type is not appropriate for the operation (Since 1.8)
* @CAIRO_STATUS_USER_FONT_IMMUTABLE: the user-font is immutable (Since 1.8)
* @CAIRO_STATUS_USER_FONT_ERROR: error occurred in a user-font callback function (Since 1.8)
+ * @CAIRO_STATUS_NEGATIVE_COUNT: negative number used where it is not allowed (Since 1.8)
*
* #cairo_status_t is used to indicate errors that can occur when
* using Cairo. In some cases it is returned directly by functions.
@@ -243,7 +244,8 @@ typedef enum _cairo_status {
CAIRO_STATUS_INVALID_STRIDE,
CAIRO_STATUS_FONT_TYPE_MISMATCH,
CAIRO_STATUS_USER_FONT_IMMUTABLE,
- CAIRO_STATUS_USER_FONT_ERROR
+ CAIRO_STATUS_USER_FONT_ERROR,
+ CAIRO_STATUS_NEGATIVE_COUNT
/* after adding a new error: update CAIRO_STATUS_LAST_STATUS in cairoint.h */
} cairo_status_t;
diff --git a/src/cairoint.h b/src/cairoint.h
index e2a6d3d..9e5c38c 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -110,7 +110,7 @@ _cairo_win32_tmpfile (void);
* a bit of a pain, but it should be easy to always catch as long as
* one adds a new test case to test a trigger of the new status value.
*/
-#define CAIRO_STATUS_LAST_STATUS CAIRO_STATUS_USER_FONT_ERROR
+#define CAIRO_STATUS_LAST_STATUS CAIRO_STATUS_NEGATIVE_COUNT
/* Size in bytes of buffer to use off the stack per functions.
commit ce24588d1c5e82e598cdad68c910a64f64864c7b
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jun 23 17:51:32 2008 -0400
[doc] Update doc/public/Headers.mk
diff --git a/doc/public/Headers.mk b/doc/public/Headers.mk
index 9b7aef6..d04e1a9 100644
--- a/doc/public/Headers.mk
+++ b/doc/public/Headers.mk
@@ -39,7 +39,9 @@ PRIVATE_TEST_HFILES = \
cairo-svg-surface-private.h \
cairo-truetype-subset-private.h \
cairo-type1-private.h \
+ cairo-type3-glyph-surface-private.h \
cairo-types-private.h \
+ cairo-user-font-private.h \
cairo-wideint-private.h \
cairo-wideint-type-private.h \
cairo-win32-private.h \
commit 676b221326cacdd205c225bba8ac43378b4abb81
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jun 23 17:39:16 2008 -0400
Protect against NULL glyphs array in text API
We still don't do anything if num_glyphs is negative. Why isn't
that argument unsigned int...
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index bfdf17b..ca42d92 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -1176,6 +1176,15 @@ cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
return;
}
+ if (num_glyphs == 0)
+ return;
+
+ if (glyphs == NULL) {
+ cairo_status_t status = _cairo_error (CAIRO_STATUS_NULL_POINTER);
+ /* XXX Can't propagate error */
+ return;
+ }
+
CAIRO_MUTEX_LOCK (scaled_font->mutex);
_cairo_scaled_font_freeze_cache (scaled_font);
diff --git a/src/cairo.c b/src/cairo.c
index 7f8c5ff..e8e2f4a 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -2949,7 +2949,7 @@ cairo_get_scaled_font (cairo_t *cr)
/**
* cairo_text_extents:
* @cr: a #cairo_t
- * @utf8: a string of text, encoded in UTF-8
+ * @utf8: a string of text encoded in UTF-8, or %NULL
* @extents: a #cairo_text_extents_t object into which the results
* will be stored
*
@@ -3042,6 +3042,14 @@ cairo_glyph_extents (cairo_t *cr,
if (cr->status)
return;
+ if (num_glyphs == 0)
+ return;
+
+ if (glyphs == NULL) {
+ _cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
+ return;
+ }
+
status = _cairo_gstate_glyph_extents (cr->gstate, glyphs, num_glyphs,
extents);
if (status)
@@ -3051,7 +3059,7 @@ cairo_glyph_extents (cairo_t *cr,
/**
* cairo_show_text:
* @cr: a cairo context
- * @utf8: a string of text encoded in UTF-8
+ * @utf8: a string of text encoded in UTF-8, or %NULL
*
* A drawing operator that generates the shape from a string of UTF-8
* characters, rendered according to the current font_face, font_size
@@ -3145,6 +3153,11 @@ cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
if (num_glyphs == 0)
return;
+ if (glyphs == NULL) {
+ _cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
+ return;
+ }
+
status = _cairo_gstate_show_glyphs (cr->gstate, glyphs, num_glyphs);
if (status)
_cairo_set_error (cr, status);
@@ -3153,7 +3166,7 @@ cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
/**
* cairo_text_path:
* @cr: a cairo context
- * @utf8: a string of text encoded in UTF-8
+ * @utf8: a string of text encoded in UTF-8, or %NULL
*
* Adds closed paths for text to the current path. The generated
* path if filled, achieves an effect similar to that of
@@ -3249,6 +3262,11 @@ cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs)
if (num_glyphs == 0)
return;
+ if (glyphs == NULL) {
+ _cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
+ return;
+ }
+
status = _cairo_gstate_glyph_path (cr->gstate,
glyphs, num_glyphs,
cr->path);
commit 233b387c29f2108a41fca14cc275337903117169
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Mon Jun 23 00:30:04 2008 -0400
Use #include "cairo-*." instead of #include <cairo-*.h>
The rule is simple: <x.h> for system / other project includes,
"x.h" for local includes.
diff --git a/src/cairo-beos.h b/src/cairo-beos.h
index 45a3d54..f53be5a 100644
--- a/src/cairo-beos.h
+++ b/src/cairo-beos.h
@@ -36,7 +36,7 @@
#ifndef CAIRO_BEOS_H
#define CAIRO_BEOS_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_BEOS_SURFACE
diff --git a/src/cairo-directfb.h b/src/cairo-directfb.h
index 21005e1..6b3fcbd 100644
--- a/src/cairo-directfb.h
+++ b/src/cairo-directfb.h
@@ -47,7 +47,7 @@
#ifndef CAIRO_DIRECTFB_H
#define CAIRO_DIRECTFB_H
-#include <cairo.h>
+#include "cairo.h"
#ifdef CAIRO_HAS_DIRECTFB_SURFACE
diff --git a/src/cairo-ft-private.h b/src/cairo-ft-private.h
index e6436ca..3e7d3de 100644
--- a/src/cairo-ft-private.h
+++ b/src/cairo-ft-private.h
@@ -37,8 +37,8 @@
#ifndef CAIRO_FT_PRIVATE_H
#define CAIRO_FT_PRIVATE_H
-#include <cairo-ft.h>
-#include <cairoint.h>
+#include "cairo-ft.h"
+#include "cairoint.h"
#if CAIRO_HAS_FT_FONT
diff --git a/src/cairo-ft.h b/src/cairo-ft.h
index b59435f..91e2db8 100644
--- a/src/cairo-ft.h
+++ b/src/cairo-ft.h
@@ -37,7 +37,7 @@
#ifndef CAIRO_FT_H
#define CAIRO_FT_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_FT_FONT
diff --git a/src/cairo-glitz.h b/src/cairo-glitz.h
index 622fda2..08519dc 100644
--- a/src/cairo-glitz.h
+++ b/src/cairo-glitz.h
@@ -37,7 +37,7 @@
#ifndef CAIRO_GLITZ_H
#define CAIRO_GLITZ_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_GLITZ_SURFACE
diff --git a/src/cairo-mutex-impl-private.h b/src/cairo-mutex-impl-private.h
index 6905566..db3393a 100644
--- a/src/cairo-mutex-impl-private.h
+++ b/src/cairo-mutex-impl-private.h
@@ -45,7 +45,7 @@
#include "config.h"
#endif
-#include <cairo-features.h>
+#include "cairo-features.h"
CAIRO_BEGIN_DECLS
diff --git a/src/cairo-mutex-type-private.h b/src/cairo-mutex-type-private.h
index f940829..d8079a3 100644
--- a/src/cairo-mutex-type-private.h
+++ b/src/cairo-mutex-type-private.h
@@ -45,7 +45,7 @@
#include "config.h"
#endif
-#include <cairo-features.h>
+#include "cairo-features.h"
#include "cairo-compiler-private.h"
#include "cairo-mutex-impl-private.h"
diff --git a/src/cairo-os2-private.h b/src/cairo-os2-private.h
index 71496ac..6e8eb7b 100644
--- a/src/cairo-os2-private.h
+++ b/src/cairo-os2-private.h
@@ -49,7 +49,7 @@
# include <os2emx.h>
#endif
-#include <cairo-os2.h>
+#include "cairo-os2.h"
#include "cairoint.h"
typedef struct _cairo_os2_surface
diff --git a/src/cairo-os2.h b/src/cairo-os2.h
index 97ab88c..d0a13e4 100644
--- a/src/cairo-os2.h
+++ b/src/cairo-os2.h
@@ -38,7 +38,7 @@
#ifndef _CAIRO_OS2_H_
#define _CAIRO_OS2_H_
-#include <cairo.h>
+#include "cairo.h"
CAIRO_BEGIN_DECLS
diff --git a/src/cairo-pdf.h b/src/cairo-pdf.h
index 52a8974..1a066b3 100644
--- a/src/cairo-pdf.h
+++ b/src/cairo-pdf.h
@@ -37,7 +37,7 @@
#ifndef CAIRO_PDF_H
#define CAIRO_PDF_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_PDF_SURFACE
diff --git a/src/cairo-ps.h b/src/cairo-ps.h
index 720b1b7..8a2cb58 100644
--- a/src/cairo-ps.h
+++ b/src/cairo-ps.h
@@ -37,7 +37,7 @@
#ifndef CAIRO_PS_H
#define CAIRO_PS_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_PS_SURFACE
diff --git a/src/cairo-quartz-image.h b/src/cairo-quartz-image.h
index ae2b2f1..d6b7b1b 100644
--- a/src/cairo-quartz-image.h
+++ b/src/cairo-quartz-image.h
@@ -36,7 +36,7 @@
#ifndef CAIRO_QUARTZ_IMAGE_H
#define CAIRO_QUARTZ_IMAGE_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_QUARTZ_IMAGE_SURFACE
diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h
index 07d5a8e..f321c5b 100644
--- a/src/cairo-quartz-private.h
+++ b/src/cairo-quartz-private.h
@@ -41,7 +41,7 @@
#include "cairoint.h"
#ifdef CAIRO_HAS_QUARTZ_SURFACE
-#include <cairo-quartz.h>
+#include "cairo-quartz.h"
typedef struct cairo_quartz_surface {
cairo_surface_t base;
diff --git a/src/cairo-quartz.h b/src/cairo-quartz.h
index 7982fbb..d34cca6 100644
--- a/src/cairo-quartz.h
+++ b/src/cairo-quartz.h
@@ -36,7 +36,7 @@
#ifndef CAIRO_QUARTZ_H
#define CAIRO_QUARTZ_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_QUARTZ_SURFACE
diff --git a/src/cairo-svg.h b/src/cairo-svg.h
index 5d18c64..7851338 100644
--- a/src/cairo-svg.h
+++ b/src/cairo-svg.h
@@ -32,7 +32,7 @@
#ifndef CAIRO_SVG_H
#define CAIRO_SVG_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_SVG_SURFACE
diff --git a/src/cairo-win32-private.h b/src/cairo-win32-private.h
index b40ce9f..1cdf597 100644
--- a/src/cairo-win32-private.h
+++ b/src/cairo-win32-private.h
@@ -36,8 +36,8 @@
#ifndef CAIRO_WIN32_PRIVATE_H
#define CAIRO_WIN32_PRIVATE_H
-#include <cairo-win32.h>
-#include <cairoint.h>
+#include "cairo-win32.h"
+#include "cairoint.h"
#ifndef SHADEBLENDCAPS
#define SHADEBLENDCAPS 120
diff --git a/src/cairo-win32.h b/src/cairo-win32.h
index 933133f..8bd7a97 100644
--- a/src/cairo-win32.h
+++ b/src/cairo-win32.h
@@ -37,7 +37,7 @@
#ifndef _CAIRO_WIN32_H_
#define _CAIRO_WIN32_H_
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_WIN32_SURFACE
diff --git a/src/cairo-xcb-xrender.h b/src/cairo-xcb-xrender.h
index 9df6856..09c6097 100644
--- a/src/cairo-xcb-xrender.h
+++ b/src/cairo-xcb-xrender.h
@@ -37,7 +37,7 @@
#ifndef CAIRO_XCB_XRENDER_H
#define CAIRO_XCB_XRENDER_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_XCB_SURFACE
diff --git a/src/cairo-xcb.h b/src/cairo-xcb.h
index e180bb6..1b6d2e6 100644
--- a/src/cairo-xcb.h
+++ b/src/cairo-xcb.h
@@ -37,7 +37,7 @@
#ifndef CAIRO_XCB_H
#define CAIRO_XCB_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_XCB_SURFACE
diff --git a/src/cairo-xlib-xrender.h b/src/cairo-xlib-xrender.h
index 6dd584f..c1c4c62 100644
--- a/src/cairo-xlib-xrender.h
+++ b/src/cairo-xlib-xrender.h
@@ -37,7 +37,7 @@
#ifndef CAIRO_XLIB_XRENDER_H
#define CAIRO_XLIB_XRENDER_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_XLIB_XRENDER_SURFACE
diff --git a/src/cairo-xlib.h b/src/cairo-xlib.h
index ad92b39..29e9f10 100644
--- a/src/cairo-xlib.h
+++ b/src/cairo-xlib.h
@@ -37,7 +37,7 @@
#ifndef CAIRO_XLIB_H
#define CAIRO_XLIB_H
-#include <cairo.h>
+#include "cairo.h"
#if CAIRO_HAS_XLIB_SURFACE
diff --git a/src/cairo.h b/src/cairo.h
index b00420c..6010697 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -38,8 +38,8 @@
#ifndef CAIRO_H
#define CAIRO_H
-#include <cairo-features.h>
-#include <cairo-deprecated.h>
+#include "cairo-features.h"
+#include "cairo-deprecated.h"
CAIRO_BEGIN_DECLS
commit 9fea50a1e6c15ad6a80c941f6ddaba768e84e951
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Jun 22 15:15:44 2008 -0400
Rename _cairo_font_reset_static_data to _cairo_font_face_reset_static_data
diff --git a/src/cairo-debug.c b/src/cairo-debug.c
index da20527..61156f0 100644
--- a/src/cairo-debug.c
+++ b/src/cairo-debug.c
@@ -61,15 +61,15 @@ cairo_debug_reset_static_data (void)
{
CAIRO_MUTEX_INITIALIZE ();
- _cairo_font_reset_static_data ();
+ _cairo_font_face_reset_static_data ();
#if CAIRO_HAS_FT_FONT
_cairo_ft_font_reset_static_data ();
#endif
- _cairo_pattern_reset_static_data ();
-
_cairo_scaled_font_reset_static_data ();
+ _cairo_pattern_reset_static_data ();
+
CAIRO_MUTEX_FINALIZE ();
}
diff --git a/src/cairo-font-face.c b/src/cairo-font-face.c
index 6fe6dfc..97841b9 100644
--- a/src/cairo-font-face.c
+++ b/src/cairo-font-face.c
@@ -535,7 +535,7 @@ _cairo_unscaled_font_destroy (cairo_unscaled_font_t *unscaled_font)
}
void
-_cairo_font_reset_static_data (void)
+_cairo_font_face_reset_static_data (void)
{
_cairo_scaled_font_map_destroy ();
diff --git a/src/cairoint.h b/src/cairoint.h
index a312055..e2a6d3d 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -339,7 +339,7 @@ struct _cairo_font_face {
};
cairo_private void
-_cairo_font_reset_static_data (void);
+_cairo_font_face_reset_static_data (void);
cairo_private void
_cairo_ft_font_reset_static_data (void);
commit 7407362d705516262fed9f5bccfb8d3d5a26632f
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Jun 22 15:13:42 2008 -0400
Rename cairo_quartz_scaled_font_backend to _cairo_quartz_scaled_font_backend
diff --git a/src/cairo-quartz-font.c b/src/cairo-quartz-font.c
index 3203983..ee5e52b 100644
--- a/src/cairo-quartz-font.c
+++ b/src/cairo-quartz-font.c
@@ -165,7 +165,7 @@ _cairo_quartz_font_face_scaled_font_create (void *abstract_face,
status = _cairo_scaled_font_init (&font->base,
&font_face->base, font_matrix, ctm, options,
- &cairo_quartz_scaled_font_backend);
+ &_cairo_quartz_scaled_font_backend);
if (status)
goto FINISH;
@@ -735,7 +735,7 @@ _cairo_quartz_ucs4_to_index (void *abstract_font,
return glyph;
}
-const cairo_scaled_font_backend_t cairo_quartz_scaled_font_backend = {
+const cairo_scaled_font_backend_t _cairo_quartz_scaled_font_backend = {
CAIRO_FONT_TYPE_QUARTZ,
_cairo_quartz_font_create_toy,
_cairo_quartz_font_fini,
diff --git a/src/cairoint.h b/src/cairoint.h
index aef225e..a312055 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -477,7 +477,7 @@ extern const cairo_private struct _cairo_scaled_font_backend _cairo_win32_scaled
#if CAIRO_HAS_QUARTZ_FONT
-extern const cairo_private struct _cairo_scaled_font_backend cairo_quartz_scaled_font_backend;
+extern const cairo_private struct _cairo_scaled_font_backend _cairo_quartz_scaled_font_backend;
#endif
@@ -907,7 +907,7 @@ typedef struct _cairo_traps {
#elif CAIRO_HAS_QUARTZ_FONT
#define CAIRO_FONT_FAMILY_DEFAULT CAIRO_QUARTZ_FONT_FAMILY_DEFAULT
-#define CAIRO_SCALED_FONT_BACKEND_DEFAULT &cairo_quartz_scaled_font_backend
+#define CAIRO_SCALED_FONT_BACKEND_DEFAULT &_cairo_quartz_scaled_font_backend
#elif CAIRO_HAS_FT_FONT
commit 4240794ea4d25bfa9c0edd10243a94ab00275387
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Jun 22 15:13:15 2008 -0400
Rename cairo_win32_scaled_font_backend to _cairo_win32_scaled_font_backend
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 74b072c..140093b 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -61,7 +61,7 @@
#define CMAP_TAG 0x70616d63
-const cairo_scaled_font_backend_t cairo_win32_scaled_font_backend;
+const cairo_scaled_font_backend_t _cairo_win32_scaled_font_backend;
typedef struct {
cairo_scaled_font_t base;
@@ -322,7 +322,7 @@ _win32_scaled_font_create (LOGFONTW *logfont,
status = _cairo_scaled_font_init (&f->base, font_face,
font_matrix, ctm, options,
- &cairo_win32_scaled_font_backend);
+ &_cairo_win32_scaled_font_backend);
if (status)
goto FAIL;
@@ -1778,7 +1778,7 @@ _cairo_win32_scaled_font_init_glyph_path (cairo_win32_scaled_font_t *scaled_font
return status;
}
-const cairo_scaled_font_backend_t cairo_win32_scaled_font_backend = {
+const cairo_scaled_font_backend_t _cairo_win32_scaled_font_backend = {
CAIRO_FONT_TYPE_WIN32,
_cairo_win32_scaled_font_create_toy,
_cairo_win32_scaled_font_fini,
@@ -1945,7 +1945,7 @@ cairo_win32_font_face_create_for_hfont (HFONT font)
static cairo_bool_t
_cairo_scaled_font_is_win32 (cairo_scaled_font_t *scaled_font)
{
- return scaled_font->backend == &cairo_win32_scaled_font_backend;
+ return scaled_font->backend == &_cairo_win32_scaled_font_backend;
}
/**
diff --git a/src/cairoint.h b/src/cairoint.h
index 192c803..aef225e 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -471,7 +471,7 @@ extern const cairo_private struct _cairo_scaled_font_backend _cairo_ft_scaled_fo
#if CAIRO_HAS_WIN32_FONT
-extern const cairo_private struct _cairo_scaled_font_backend cairo_win32_scaled_font_backend;
+extern const cairo_private struct _cairo_scaled_font_backend _cairo_win32_scaled_font_backend;
#endif
@@ -902,7 +902,7 @@ typedef struct _cairo_traps {
#if CAIRO_HAS_WIN32_FONT
#define CAIRO_FONT_FAMILY_DEFAULT CAIRO_WIN32_FONT_FAMILY_DEFAULT
-#define CAIRO_SCALED_FONT_BACKEND_DEFAULT &cairo_win32_scaled_font_backend
+#define CAIRO_SCALED_FONT_BACKEND_DEFAULT &_cairo_win32_scaled_font_backend
#elif CAIRO_HAS_QUARTZ_FONT
commit e09f20fe01f17f093acefd341a517fcb83b6ea1e
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Jun 22 14:50:08 2008 -0400
[gstate] Fix huge-font path;fill fallback options
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 7b12073..2579de7 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -1567,9 +1567,9 @@ _cairo_gstate_show_glyphs (cairo_gstate_t *gstate,
gstate->op,
&source_pattern.base,
&path,
- gstate->fill_rule,
+ CAIRO_FILL_RULE_WINDING,
gstate->tolerance,
- gstate->antialias);
+ gstate->scaled_font->options.antialias);
_cairo_path_fixed_fini (&path);
}
More information about the cairo-commit
mailing list