? src/cairo-ft-font.c.clean
Index: src/cairo-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-font.c,v
retrieving revision 1.58
diff -u -p -r1.58 cairo-font.c
--- src/cairo-font.c	28 Jul 2005 16:29:46 -0000	1.58
+++ src/cairo-font.c	28 Jul 2005 19:38:09 -0000
@@ -466,6 +466,10 @@ static const cairo_scaled_font_t _cairo_
     { 1., 0., 0., 1., 0, 0},	/* font_matrix */
     { 1., 0., 0., 1., 0, 0},	/* ctm */
     { 1., 0., 0., 1., 0, 0},	/* scale */
+    { CAIRO_ANTIALIAS_DEFAULT,	/* options */
+      CAIRO_SUBPIXEL_ORDER_DEFAULT,
+      CAIRO_HINT_STYLE_DEFAULT,
+      CAIRO_HINT_METRICS_DEFAULT} ,
     NULL,			/* font_face */
     CAIRO_SCALED_FONT_BACKEND_DEFAULT,
 };
@@ -864,6 +868,7 @@ void
 _cairo_scaled_font_init (cairo_scaled_font_t               *scaled_font, 
 			 const cairo_matrix_t              *font_matrix,
 			 const cairo_matrix_t              *ctm,
+			 const cairo_font_options_t        *options,
 			 const cairo_scaled_font_backend_t *backend)
 {
     scaled_font->status = CAIRO_STATUS_SUCCESS;
@@ -871,6 +876,8 @@ _cairo_scaled_font_init (cairo_scaled_fo
     scaled_font->font_matrix = *font_matrix;
     scaled_font->ctm = *ctm;
     cairo_matrix_multiply (&scaled_font->scale, &scaled_font->font_matrix, &scaled_font->ctm);
+
+    scaled_font->options = *options;
     
     scaled_font->ref_count = 1;
     scaled_font->backend = backend;
@@ -1071,6 +1078,7 @@ cairo_scaled_font_destroy (cairo_scaled_
 	key.font_face = scaled_font->font_face;
 	key.font_matrix = &scaled_font->font_matrix;
 	key.ctm = &scaled_font->ctm;
+	key.options = scaled_font->options;
 	
 	_cairo_cache_remove (cache, &key);
 	_unlock_global_font_cache ();
Index: src/cairo-ft-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-ft-font.c,v
retrieving revision 1.82
diff -u -p -r1.82 cairo-ft-font.c
--- src/cairo-ft-font.c	28 Jul 2005 16:46:38 -0000	1.82
+++ src/cairo-ft-font.c	28 Jul 2005 19:38:10 -0000
@@ -1218,7 +1218,6 @@ const cairo_unscaled_font_backend_t cair
 typedef struct {
     cairo_scaled_font_t base;
     int load_flags;
-    cairo_font_options_t options;
     ft_unscaled_font_t *unscaled;
 } cairo_ft_scaled_font_t;
 
@@ -1385,14 +1384,12 @@ _ft_scaled_font_create (ft_unscaled_font
     f->unscaled = unscaled;
     _cairo_unscaled_font_reference (&unscaled->base);
     
-    f->options = *options;
-
     if (options->hint_metrics != CAIRO_HINT_METRICS_OFF)
 	load_flags |= PRIVATE_FLAG_HINT_METRICS;
 
     f->load_flags = load_flags;
 
-    _cairo_scaled_font_init (&f->base, font_matrix, ctm, &cairo_ft_scaled_font_backend);
+    _cairo_scaled_font_init (&f->base, font_matrix, ctm, options, &cairo_ft_scaled_font_backend);
 
     return (cairo_scaled_font_t *)f;
 }
@@ -1611,7 +1608,7 @@ _cairo_ft_scaled_font_font_extents (void
      * Get to unscaled metrics so that the upper level can get back to
      * user space
      */
-    if (scaled_font->options.hint_metrics != CAIRO_HINT_METRICS_OFF) {
+    if (scaled_font->base.options.hint_metrics != CAIRO_HINT_METRICS_OFF) {
 	double x_factor, y_factor;
 
 	if (scaled_font->unscaled->x_scale == 0)
Index: src/cairo-win32-font.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-win32-font.c,v
retrieving revision 1.32
diff -u -p -r1.32 cairo-win32-font.c
--- src/cairo-win32-font.c	28 Jul 2005 17:37:41 -0000	1.32
+++ src/cairo-win32-font.c	28 Jul 2005 19:38:10 -0000
@@ -58,7 +58,6 @@ typedef struct {
     cairo_scaled_font_t base;
 
     LOGFONTW logfont;
-    cairo_font_options_t options;
 
     BYTE quality;
 
@@ -227,7 +226,6 @@ _win32_scaled_font_create (LOGFONTW     
 	return NULL;
 
     f->logfont = *logfont;
-    f->options = *options;
 
     /* We don't have any control over the hinting style or subpixel
      * order in the Win32 font API, so we ignore those parts of
@@ -263,7 +261,7 @@ _win32_scaled_font_create (LOGFONTW     
     cairo_matrix_multiply (&scale, font_matrix, ctm);
     _compute_transform (f, &scale);
 
-    _cairo_scaled_font_init (&f->base, font_matrix, ctm, &cairo_win32_scaled_font_backend);
+    _cairo_scaled_font_init (&f->base, font_matrix, ctm, options, &cairo_win32_scaled_font_backend);
 
     return &f->base;
 }
Index: src/cairoint.h
===================================================================
RCS file: /cvs/cairo/cairo/src/cairoint.h,v
retrieving revision 1.174
diff -u -p -r1.174 cairoint.h
--- src/cairoint.h	28 Jul 2005 17:41:08 -0000	1.174
+++ src/cairoint.h	28 Jul 2005 19:38:10 -0000
@@ -458,13 +458,22 @@ struct _cairo_unscaled_font {
     const cairo_unscaled_font_backend_t *backend;
 };
 
+struct _cairo_font_options {
+    cairo_antialias_t antialias;
+    cairo_subpixel_order_t subpixel_order;
+    cairo_hint_style_t hint_style;
+    cairo_hint_metrics_t hint_metrics;
+};
+
 struct _cairo_scaled_font {
     cairo_status_t status;
     int ref_count;
     cairo_matrix_t font_matrix;	  /* font space => user space */
     cairo_matrix_t ctm;	          /* user space => device space */
     cairo_matrix_t scale;	  /* font space => device space */
+    cairo_font_options_t options;
     cairo_font_face_t *font_face; /* may be NULL */
+
     const cairo_scaled_font_backend_t *backend;
 };
 
@@ -475,13 +484,6 @@ struct _cairo_font_face {
     const cairo_font_face_backend_t *backend;
 };
 
-struct _cairo_font_options {
-    cairo_antialias_t antialias;
-    cairo_subpixel_order_t subpixel_order;
-    cairo_hint_style_t hint_style;
-    cairo_hint_metrics_t hint_metrics;
-};
-
 /* cairo_font.c is responsible for a global glyph cache: 
  *  
  *   - glyph entries: [[[base], cairo_unscaled_font_t, scale, flags, index],
@@ -1320,6 +1322,7 @@ cairo_private void
 _cairo_scaled_font_init (cairo_scaled_font_t 	           *scaled_font, 
 			 const cairo_matrix_t              *font_matrix,
 			 const cairo_matrix_t              *ctm,
+			 const cairo_font_options_t        *options,
 			 const cairo_scaled_font_backend_t *backend);
 
 cairo_private void
