diff --git a/ChangeLog b/ChangeLog index 0de4d7818..87a8b0592 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-05 Carl Worth + + * src/cairo-font-options.c: (_cairo_font_options_init_copy), + (cairo_font_options_copy): Add a function for copying font options + rather than just using direct structure copying. + 2005-11-05 Carl Worth * src/cairo-ps-surface.c: (_cairo_ps_surface_show_page), diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c index d7f2529dc..920e6edd6 100644 --- a/src/cairo-font-options.c +++ b/src/cairo-font-options.c @@ -61,6 +61,16 @@ _cairo_font_options_init_default (cairo_font_options_t *options) options->hint_metrics = CAIRO_HINT_METRICS_DEFAULT; } +void +_cairo_font_options_init_copy (cairo_font_options_t *options, + const cairo_font_options_t *other) +{ + options->antialias = other->antialias; + options->subpixel_order = other->subpixel_order; + options->hint_style = other->hint_style; + options->hint_metrics = other->hint_metrics; +} + /** * cairo_font_options_create: * @@ -107,7 +117,7 @@ cairo_font_options_copy (const cairo_font_options_t *original) if (!options) return (cairo_font_options_t *)&cairo_font_options_nil; - *options = *original; + _cairo_font_options_init_copy (options, original); return options; }