summaryrefslogtreecommitdiff
path: root/src/cairo-font-options.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-11-07 09:26:47 +0000
committerCarl Worth <cworth@cworth.org>2005-11-07 09:26:47 +0000
commitfe324c44153cf37a51b51883780daee5500173be (patch)
treeaba9d9936bfe8fb949707ac534877c2b5116ff52 /src/cairo-font-options.c
parentf79d48640f26fd5c02d949ac759090dafaa002ec (diff)
downloadcairo-fe324c44153cf37a51b51883780daee5500173be.tar.gz
Add a function for copying font options rather than just using direct structure copying.
Diffstat (limited to 'src/cairo-font-options.c')
-rw-r--r--src/cairo-font-options.c12
1 files changed, 11 insertions, 1 deletions
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;
}