summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cairo-analysis-surface.c4
-rw-r--r--src/cairo-array.c2
-rw-r--r--src/cairo-cogl-surface.c4
-rw-r--r--src/cairo-default-context.c2
-rw-r--r--src/cairo-ft-font.c16
-rw-r--r--src/cairo-gl-device.c2
-rw-r--r--src/cairo-gl-surface.c2
-rw-r--r--src/cairo-hash.c2
-rw-r--r--src/cairo-misc.c2
-rw-r--r--src/cairo-paginated-private.h2
-rw-r--r--src/cairo-paginated-surface.c2
-rw-r--r--src/cairo-pattern.c8
-rw-r--r--src/cairo-pdf-operators.c4
-rw-r--r--src/cairo-pdf-surface.c5
-rw-r--r--src/cairo-ps-surface-private.h2
-rw-r--r--src/cairo-ps-surface.c7
-rw-r--r--src/cairo-scaled-font-subsets.c9
-rw-r--r--src/cairo-script-surface.c2
-rw-r--r--src/cairo-surface.c1
-rw-r--r--src/cairo-tag-attributes.c25
-rw-r--r--src/cairo-toy-font-face.c4
-rw-r--r--src/cairo-traps.c2
-rw-r--r--src/cairo-type1-subset.c5
-rw-r--r--src/cairo.c35
-rw-r--r--src/cairoint.h2
-rw-r--r--src/win32/cairo-win32-printing-surface.c2
26 files changed, 99 insertions, 54 deletions
diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
index c4f9a6d35..d113c5fac 100644
--- a/src/cairo-analysis-surface.c
+++ b/src/cairo-analysis-surface.c
@@ -777,8 +777,8 @@ _cairo_analysis_surface_tag (void *abstract_surface,
ctm,
ctm_inverse,
clip);
- if (_cairo_int_status_is_error (backend_status))
- return backend_status;
+ if (backend_status == CAIRO_INT_STATUS_SUCCESS)
+ surface->has_supported = TRUE;
}
return backend_status;
diff --git a/src/cairo-array.c b/src/cairo-array.c
index 58c9a388f..c43ed2e12 100644
--- a/src/cairo-array.c
+++ b/src/cairo-array.c
@@ -300,7 +300,7 @@ _cairo_array_append_multiple (cairo_array_t *array,
*
* Allocate space at the end of the array for @num_elements additional
* elements, providing the address of the new memory chunk in
- * @elements. This memory will be unitialized, but will be accounted
+ * @elements. This memory will be uninitialized, but will be accounted
* for in the return value of _cairo_array_num_elements().
*
* Return value: %CAIRO_STATUS_SUCCESS if successful or
diff --git a/src/cairo-cogl-surface.c b/src/cairo-cogl-surface.c
index 2f7ed58d3..0c32940e8 100644
--- a/src/cairo-cogl-surface.c
+++ b/src/cairo-cogl-surface.c
@@ -142,7 +142,7 @@ typedef struct _cairo_cogl_path_fill_meta {
/* A cached path tessellation should be re-usable with different rotations
* and translations but not for different scales.
*
- * one idea is to track the diagonal lenghts of a unit rectangle
+ * one idea is to track the diagonal lengths of a unit rectangle
* transformed through the original ctm use to tessellate the geometry
* so we can check what the lengths are for any new ctm to know if
* this geometry is compatible.
@@ -166,7 +166,7 @@ typedef struct _cairo_cogl_path_stroke_meta {
/* A cached path tessellation should be re-usable with different rotations
* and translations but not for different scales.
*
- * one idea is to track the diagonal lenghts of a unit rectangle
+ * one idea is to track the diagonal lengths of a unit rectangle
* transformed through the original ctm use to tessellate the geometry
* so we can check what the lengths are for any new ctm to know if
* this geometry is compatible.
diff --git a/src/cairo-default-context.c b/src/cairo-default-context.c
index 985215ff7..95b5f6b77 100644
--- a/src/cairo-default-context.c
+++ b/src/cairo-default-context.c
@@ -523,7 +523,7 @@ _cairo_default_context_get_tolerance (void *abstract_cr)
}
-/* Current tranformation matrix */
+/* Current transformation matrix */
static cairo_status_t
_cairo_default_context_translate (void *abstract_cr,
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 325dd61b4..fea489d01 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -976,10 +976,12 @@ _compute_xrender_bitmap_size(FT_Bitmap *target,
pitch = width * 4;
break;
+#ifdef FT_PIXEL_MODE_BGRA
case FT_PIXEL_MODE_BGRA:
/* each pixel is replicated into a 32-bit ARGB value */
pitch = width * 4;
break;
+#endif
default: /* unsupported source format */
return -1;
@@ -1177,10 +1179,12 @@ _fill_xrender_bitmap(FT_Bitmap *target,
}
break;
+#ifdef FT_PIXEL_MODE_BGRA
case FT_PIXEL_MODE_BGRA:
for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch)
memcpy (dstLine, srcLine, width * 4);
break;
+#endif
default:
assert (0);
@@ -1289,6 +1293,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
component_alpha = TRUE;
}
break;
+#ifdef FT_PIXEL_MODE_BGRA
case FT_PIXEL_MODE_BGRA:
stride = width * 4;
if (own_buffer) {
@@ -1311,6 +1316,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
}
format = CAIRO_FORMAT_ARGB32;
break;
+#endif
case FT_PIXEL_MODE_GRAY2:
case FT_PIXEL_MODE_GRAY4:
convert:
@@ -2393,7 +2399,11 @@ skip:
done:
free (coords);
free (current_coords);
+#if HAVE_FT_DONE_MM_VAR
+ FT_Done_MM_Var (face->glyph->library, ft_mm_var);
+#else
free (ft_mm_var);
+#endif
}
}
@@ -2487,7 +2497,9 @@ _cairo_ft_scaled_glyph_init (void *abstract_font,
vertical_layout = TRUE;
}
+#ifdef FT_LOAD_COLOR
load_flags |= FT_LOAD_COLOR;
+#endif
if (info & CAIRO_SCALED_GLYPH_INFO_METRICS) {
@@ -2656,7 +2668,9 @@ LOAD:
*/
scaled_glyph_loaded = FALSE;
info &= ~CAIRO_SCALED_GLYPH_INFO_METRICS;
+#ifdef FT_LOAD_COLOR
load_flags &= ~FT_LOAD_COLOR;
+#endif
goto LOAD;
}
@@ -2881,7 +2895,7 @@ _cairo_index_to_glyph_name (void *abstract_font,
cairo_ft_scaled_font_t *scaled_font = abstract_font;
cairo_ft_unscaled_font_t *unscaled = scaled_font->unscaled;
FT_Face face;
- char buffer[256]; /* PLRM spcifies max name length of 127 */
+ char buffer[256]; /* PLRM specifies max name length of 127 */
FT_Error error;
int i;
diff --git a/src/cairo-gl-device.c b/src/cairo-gl-device.c
index 258b4c50d..6f4c852a4 100644
--- a/src/cairo-gl-device.c
+++ b/src/cairo-gl-device.c
@@ -606,7 +606,7 @@ _cairo_gl_ensure_stencil (cairo_gl_context_t *ctx,
* glLoadIdentity()
* gluOrtho2D()
*
- * The calculation for the ortho tranformation was taken from the
+ * The calculation for the ortho transformation was taken from the
* mesa source code.
*/
static void
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
index 12ea3ddc4..b0f42d6aa 100644
--- a/src/cairo-gl-surface.c
+++ b/src/cairo-gl-surface.c
@@ -1252,7 +1252,7 @@ _cairo_gl_surface_map_to_image (void *abstract_surface,
return _cairo_image_surface_create_in_error (status);
}
- /* We must invert the image manualy if we lack GL_MESA_pack_invert */
+ /* We must invert the image manually if we lack GL_MESA_pack_invert */
if (flipped && ! mesa_invert) {
uint8_t stack[1024], *row = stack;
uint8_t *top = image->data;
diff --git a/src/cairo-hash.c b/src/cairo-hash.c
index 5a789906f..151842eb6 100644
--- a/src/cairo-hash.c
+++ b/src/cairo-hash.c
@@ -204,7 +204,7 @@ _cairo_hash_table_create (cairo_hash_keys_equal_func_t keys_equal)
* _cairo_hash_table_destroy is called. It is a fatal error otherwise,
* and this function will halt. The rationale for this behavior is to
* avoid memory leaks and to avoid needless complication of the API
- * with destroy notifiy callbacks.
+ * with destroy notify callbacks.
*
* WARNING: The hash_table must have no running iterators in it when
* _cairo_hash_table_destroy is called. It is a fatal error otherwise,
diff --git a/src/cairo-misc.c b/src/cairo-misc.c
index 6e63bc7e6..2f551ee27 100644
--- a/src/cairo-misc.c
+++ b/src/cairo-misc.c
@@ -959,7 +959,7 @@ _cairo_fopen (const char *filename, const char *mode, FILE **file_out)
/* tmpfile() replacement for Windows.
*
* On Windows tmpfile() creates the file in the root directory. This
- * may fail due to unsufficient privileges. However, this isn't a
+ * may fail due to insufficient privileges. However, this isn't a
* problem on Windows CE so we don't use it there.
*/
FILE *
diff --git a/src/cairo-paginated-private.h b/src/cairo-paginated-private.h
index b85a5db6b..89f1c99a2 100644
--- a/src/cairo-paginated-private.h
+++ b/src/cairo-paginated-private.h
@@ -80,7 +80,7 @@ struct _cairo_paginated_surface_backend {
(*supports_fine_grained_fallbacks) (void *surface);
/* Optional. Indicates whether the page requires a thumbnail image to be
- * supplied. If a thumbnail is required, set width, heigh to size required
+ * supplied. If a thumbnail is required, set width, height to size required
* and return TRUE.
*/
cairo_bool_t
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index fc16f790b..6b35c1f92 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -780,7 +780,7 @@ static const cairo_surface_backend_t cairo_paginated_surface_backend = {
_cairo_paginated_context_create,
_cairo_paginated_surface_create_similar,
- NULL, /* create simlar image */
+ NULL, /* create similar image */
NULL, /* map to image */
NULL, /* unmap image */
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index fde044a4d..32811af59 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -2331,7 +2331,7 @@ _cairo_radial_pattern_box_to_parameter (const cairo_radial_pattern_t *radial,
maxx = x1 + DBL_EPSILON;
maxy = y1 + DBL_EPSILON;
- /* we dont' allow negative radiuses, so we will be checking that
+ /* we don't allow negative radiuses, so we will be checking that
* t*dr >= mindr to consider t valid */
mindr = -(cr + DBL_EPSILON);
@@ -3022,8 +3022,8 @@ _cairo_pattern_alpha_range (const cairo_pattern_t *pattern,
*
* This function cannot be used while the mesh is being constructed.
*
- * The function returns TRUE and sets the output parametes to define
- * the coodrinate range if the mesh pattern contains at least one
+ * The function returns TRUE and sets the output parameters to define
+ * the coordinate range if the mesh pattern contains at least one
* patch, otherwise it returns FALSE.
**/
cairo_bool_t
@@ -4760,7 +4760,7 @@ _cairo_debug_print_pattern (FILE *file, const cairo_pattern_t *pattern)
case CAIRO_FILTER_BEST: s = "best"; break;
case CAIRO_FILTER_NEAREST: s = "nearest"; break;
case CAIRO_FILTER_BILINEAR: s = "bilinear"; break;
- case CAIRO_FILTER_GAUSSIAN: s = "guassian"; break;
+ case CAIRO_FILTER_GAUSSIAN: s = "gaussian"; break;
default: s = "invalid"; ASSERT_NOT_REACHED; break;
}
fprintf (file, " filter: %s\n", s);
diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c
index 491ef8ca2..328e893d7 100644
--- a/src/cairo-pdf-operators.c
+++ b/src/cairo-pdf-operators.c
@@ -798,7 +798,7 @@ _cairo_pdf_operators_emit_stroke (cairo_pdf_operators_t *pdf_operators,
}
/* The PDF CTM is transformed to the user space CTM when stroking
- * so the corect pen shape will be used. This also requires that
+ * so the correct pen shape will be used. This also requires that
* the path be transformed to user space when emitted. The
* conversion of path coordinates to user space may cause rounding
* errors. For example the device space point (1.234, 3.142) when
@@ -1326,7 +1326,7 @@ _cairo_pdf_operators_emit_glyph (cairo_pdf_operators_t *pdf_operator
* current position to the next glyph. We also use the Td
* operator to move the current position if the horizontal
* position changes by more than 10 (in text space
- * units). This is becauses the horizontal glyph positioning
+ * units). This is because the horizontal glyph positioning
* in the TJ operator is intended for kerning and there may be
* PDF consumers that do not handle very large position
* adjustments in TJ.
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 7eb61aa1e..939b2d2d7 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -7711,6 +7711,11 @@ _cairo_pdf_surface_mask (void *abstract_surface,
* and most common, case to handle. */
if (_cairo_pattern_is_constant_alpha (mask, &extents.bounded, &alpha) &&
_can_paint_pattern (source)) {
+
+ status = _cairo_pdf_operators_flush (&surface->pdf_operators);
+ if (unlikely (status))
+ goto cleanup;
+
_cairo_output_stream_printf (surface->output, "q\n");
status = _cairo_pdf_surface_paint_pattern (surface,
op,
diff --git a/src/cairo-ps-surface-private.h b/src/cairo-ps-surface-private.h
index e1681c889..f18403190 100644
--- a/src/cairo-ps-surface-private.h
+++ b/src/cairo-ps-surface-private.h
@@ -56,6 +56,8 @@ typedef struct _cairo_ps_form {
cairo_bool_t is_image;
int id;
cairo_surface_t *src_surface;
+ cairo_rectangle_int_t src_surface_extents;
+ cairo_bool_t src_surface_bounded;
cairo_filter_t filter;
/* Union of source extents required for all operations using this form */
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 0a17b81af..4adccad6b 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -3481,7 +3481,7 @@ _cairo_ps_surface_emit_solid_pattern (cairo_ps_surface_t *surface,
* @source: [in] the source for the form
* @params: [in] source parameters
* @test: [in] if TRUE, test if form will be used (excludes size check)
- * @ps_form [out] the new or exisiting entry int the hash table.
+ * @ps_form [out] the new or existing entry int the hash table.
* image or recording.
*/
static cairo_int_status_t
@@ -3548,6 +3548,8 @@ _cairo_ps_surface_use_form (cairo_ps_surface_t *surface,
source_entry->unique_id = unique_id;
source_entry->id = surface->num_forms++;
source_entry->src_surface = cairo_surface_reference (params->src_surface);
+ source_entry->src_surface_extents = *params->src_surface_extents;
+ source_entry->src_surface_bounded = params->src_surface_bounded;
source_entry->required_extents = *params->src_op_extents;
source_entry->filter = params->filter;
source_entry->is_image = params->is_image;
@@ -3726,11 +3728,14 @@ _cairo_ps_form_emit (void *entry, void *closure)
params.src_surface = form->src_surface;
params.op = CAIRO_OPERATOR_OVER;
+ params.src_surface_extents = &form->src_surface_extents;
+ params.src_surface_bounded = form->src_surface_bounded;
params.src_op_extents = &form->required_extents;
params.filter = form->filter;
params.stencil_mask = FALSE;
params.is_image = form->is_image;
params.approx_size = 0;
+ params.eod_count = 0;
_cairo_output_stream_printf (surface->final_stream,
"%%%%BeginResource: form cairoform-%d\n",
diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 5c1afd2d0..dc617f313 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -625,19 +625,14 @@ _cairo_sub_font_map_glyph (cairo_sub_font_t *sub_font,
}
/* If glyph is in the winansi encoding and font is not a user
- * font, put glyph in the latin subset. If glyph is .notdef
- * the latin subset is preferred but only if the latin subset
- * already contains at least one glyph. We don't want to
- * create a separate subset just for the .notdef glyph.
- */
+ * font, put glyph in the latin subset. */
is_latin = FALSE;
latin_character = -1;
if (sub_font->use_latin_subset &&
(! _cairo_font_face_is_user (sub_font->scaled_font->font_face)))
{
latin_character = _cairo_unicode_to_winansi (font_unicode);
- if (latin_character > 0 ||
- (latin_character == 0 && sub_font->num_glyphs_in_latin_subset > 0))
+ if (latin_character > 0)
{
if (!sub_font->latin_char_map[latin_character]) {
sub_font->latin_char_map[latin_character] = TRUE;
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index 7db7dc5b0..fb2f32222 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -3805,7 +3805,7 @@ cairo_script_create_for_stream (cairo_write_func_t write_func,
* cairo_script_write_comment:
* @script: the script (output device)
* @comment: the string to emit
- * @len:the length of the sting to write, or -1 to use strlen()
+ * @len:the length of the string to write, or -1 to use strlen()
*
* Emit a string verbatim into the script.
*
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 596ca250d..c30f84087 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2952,6 +2952,7 @@ _cairo_surface_tag (cairo_surface_t *surface,
status = surface->backend->tag (surface, begin, tag_name, attributes,
source, stroke_style,
ctm, ctm_inverse, clip);
+ surface->is_clear = FALSE;
return _cairo_surface_set_error (surface, status);
}
diff --git a/src/cairo-tag-attributes.c b/src/cairo-tag-attributes.c
index 44b1147fb..7977d87f4 100644
--- a/src/cairo-tag-attributes.c
+++ b/src/cairo-tag-attributes.c
@@ -149,7 +149,7 @@ static attribute_spec_t _ccitt_params_spec[] =
* lly - lower left y xoordinate
* urx - upper right x xoordinate
* ury - upper right y xoordinate
- * all cordinates are in PostScript coordinates.
+ * all coordinates are in PostScript coordinates.
*/
static attribute_spec_t _eps_params_spec[] =
{
@@ -217,9 +217,28 @@ static const char *
parse_float (const char *p, double *d)
{
int n;
+ const char *start = p;
+ cairo_bool_t has_decimal_point = FALSE;
- if (sscanf(p, "%lf%n", d, &n) > 0)
- return p + n;
+ while (*p) {
+ if (*p == '.' || *p == ']' || _cairo_isspace (*p))
+ break;
+ p++;
+ }
+
+ if (*p == '.')
+ has_decimal_point = TRUE;
+
+ if (has_decimal_point) {
+ char *end;
+ *d = _cairo_strtod (start, &end);
+ if (end)
+ return end;
+
+ } else {
+ if (sscanf(start, "%lf%n", d, &n) > 0)
+ return start + n;
+ }
return NULL;
}
diff --git a/src/cairo-toy-font-face.c b/src/cairo-toy-font-face.c
index 3d2217dae..f51dab5ab 100644
--- a/src/cairo-toy-font-face.c
+++ b/src/cairo-toy-font-face.c
@@ -208,7 +208,7 @@ static void
_cairo_toy_font_face_fini (cairo_toy_font_face_t *font_face)
{
/* We assert here that we own font_face->family before casting
- * away the const qualifer. */
+ * away the const qualifier. */
assert (font_face->owns_family);
free ((char*) font_face->family);
@@ -420,7 +420,7 @@ _cairo_font_face_is_toy (cairo_font_face_t *font_face)
* cairo_toy_font_face_get_family:
* @font_face: A toy font face
*
- * Gets the familly name of a toy font.
+ * Gets the family name of a toy font.
*
* Return value: The family name. This string is owned by the font face
* and remains valid as long as the font face is alive (referenced).
diff --git a/src/cairo-traps.c b/src/cairo-traps.c
index 1b7484843..c54f6f2ef 100644
--- a/src/cairo-traps.c
+++ b/src/cairo-traps.c
@@ -284,7 +284,7 @@ _cairo_traps_tessellate_convex_quad (cairo_traps_t *traps,
* cases to tessellate.
*
* First, we have to determine the Y-axis sort of the four
- * vertices, (either abcd or abdc). After that we need to detemine
+ * vertices, (either abcd or abdc). After that we need to determine
* which edges will be "left" and which will be "right" in the
* resulting trapezoids. This can be determined by computing a
* slope comparison of ab and ad to determine if b is left of d or
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 5f0745688..754c32395 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -388,6 +388,11 @@ cairo_type1_font_subset_get_bbox (cairo_type1_font_subset_t *font)
/* Freetype uses 1/yy to get units per EM */
font->base.units_per_em = 1.0/yy;
+ /* If the FontMatrix is not a uniform scale the metrics we extract
+ * from the font won't match what FreeType returns */
+ if (xx != yy || yx != 0.0 || xy != 0.0)
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+
font->base.x_min = x_min / font->base.units_per_em;
font->base.y_min = y_min / font->base.units_per_em;
font->base.x_max = x_max / font->base.units_per_em;
diff --git a/src/cairo.c b/src/cairo.c
index ca0c91e8b..b2bda657d 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -144,35 +144,34 @@
*
* An example of creating a link with user specified clickable region:
* <informalexample><programlisting>
- * cairo_font_extents_t font_extents;
+ * struct text {
+ * const char *s;
+ * double x, y;
+ * };
+ * const struct text text1 = { "This link is split", 450, 70 };
+ * const struct text text2 = { "across two lines", 50, 70 };
* cairo_text_extents_t text1_extents;
* cairo_text_extents_t text2_extents;
* char attribs[100];
- * const char *text1 = "This link is split";
- * const char *text2 = "across two lines";
- *
- * cairo_font_extents (cr, &font_extents);
- * cairo_move_to (cr, 450, 50);
- * cairo_text_extents (cr, text1, &text1_extents);
- * cairo_move_to (cr, 50, 70);
- * cairo_text_extents (cr, text2, &text2_extents);
+ *
+ * cairo_text_extents (cr, text1.s, &text1_extents);
+ * cairo_text_extents (cr, text2.s, &text2_extents);
* sprintf (attribs,
* "rect=[%f %f %f %f %f %f %f %f] uri='https://cairographics.org'",
- * text1_extents.x_bearing,
- * text1_extents.y_bearing,
+ * text1_extents.x_bearing + text1.x,
+ * text1_extents.y_bearing + text1.y,
* text1_extents.width,
* text1_extents.height,
- * text2_extents.x_bearing,
- * text2_extents.y_bearing,
+ * text2_extents.x_bearing + text2.x,
+ * text2_extents.y_bearing + text2.y,
* text2_extents.width,
* text2_extents.height);
*
* cairo_tag_begin (cr, CAIRO_TAG_LINK, attribs);
- * cairo_show_text (cr, "This is a link to the cairo website");
- * cairo_move_to (cr, 450, 50);
- * cairo_show_text (cr, text1);
- * cairo_move_to (cr, 50, 70);
- * cairo_show_text (cr, text2);
+ * cairo_move_to (cr, text1.x, text1.y);
+ * cairo_show_text (cr, text1.s);
+ * cairo_move_to (cr, text2.x, text2.y);
+ * cairo_show_text (cr, text2.s);
* cairo_tag_end (cr, CAIRO_TAG_LINK);
* </programlisting></informalexample>
*
diff --git a/src/cairoint.h b/src/cairoint.h
index cfae18cf9..4b56c2468 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -1522,7 +1522,7 @@ _cairo_surface_release_device_reference (cairo_surface_t *surface);
* visuals. This time we invented #cairo_internal_format_t instead,
* (see it for more discussion).
*
- * The punchline is that %CAIRO_FORMAT_VALID must not conside any
+ * The punchline is that %CAIRO_FORMAT_VALID must not consider any
* internal format to be valid. Also we need to decide if the
* RGB16_565 should be moved to instead be an internal format. If so,
* this macro need not change for it. (We probably will need to leave
diff --git a/src/win32/cairo-win32-printing-surface.c b/src/win32/cairo-win32-printing-surface.c
index da7357caa..094068c15 100644
--- a/src/win32/cairo-win32-printing-surface.c
+++ b/src/win32/cairo-win32-printing-surface.c
@@ -2041,7 +2041,7 @@ _cairo_win32_printing_surface_start_page (void *abstract_surface)
* coordinates.
*
* If the device context is an EMF file, using an identity
- * transform often provides insufficent resolution. The workaround
+ * transform often provides insufficient resolution. The workaround
* is to set the GDI CTM to a scale < 1 eg [1.0/16 0 0 1/0/16 0 0]
* and scale the cairo CTM by [16 0 0 16 0 0]. The
* SetWorldTransform function call to scale the GDI CTM by 1.0/16