diff --git a/test/cairo-test.h b/test/cairo-test.h index e2bf1a759..a2af43dda 100644 --- a/test/cairo-test.h +++ b/test/cairo-test.h @@ -83,6 +83,8 @@ cairo_test_NaN (void) #define CAIRO_TEST_LOG_SUFFIX ".log" +#define CAIRO_TEST_FONT_FAMILY "Bitstream Vera" + /* What is a fail and what isn't? * When running the test suite we want to detect unexpected output. This * can be caused by a change we have made to cairo itself, or a change diff --git a/test/clip-all.c b/test/clip-all.c index 3e7d24e74..dc216c9cb 100644 --- a/test/clip-all.c +++ b/test/clip-all.c @@ -55,7 +55,7 @@ draw (cairo_t *cr, int width, int height) /* https://bugs.freedesktop.org/show_bug.cgi?id=13084 */ cairo_select_font_face (cr, - "Bitstream Vera Sans", + CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/clip-empty-save.c b/test/clip-empty-save.c index 9f8fd692e..35de3cb94 100644 --- a/test/clip-empty-save.c +++ b/test/clip-empty-save.c @@ -48,7 +48,7 @@ draw (cairo_t *cr, int width, int height) /* https://bugs.freedesktop.org/show_bug.cgi?id=13084 */ cairo_select_font_face (cr, - "Bitstream Vera Sans", + CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/clip-empty.c b/test/clip-empty.c index f6848e54e..858b69a9e 100644 --- a/test/clip-empty.c +++ b/test/clip-empty.c @@ -46,7 +46,7 @@ draw (cairo_t *cr, int width, int height) /* https://bugs.freedesktop.org/show_bug.cgi?id=13084 */ cairo_select_font_face (cr, - "Bitstream Vera Sans", + CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/clip-operator.c b/test/clip-operator.c index a6562a88f..ec437e025 100644 --- a/test/clip-operator.c +++ b/test/clip-operator.c @@ -134,7 +134,7 @@ draw (cairo_t *cr, int width, int height) cairo_operator_t op; cairo_pattern_t *pattern; - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, 0.9 * HEIGHT); diff --git a/test/font-face-get-type.c b/test/font-face-get-type.c index 05a763da5..afbb73944 100644 --- a/test/font-face-get-type.c +++ b/test/font-face-get-type.c @@ -39,7 +39,7 @@ preamble (cairo_test_context_t *ctx) surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 1, 1); cr = cairo_create (surface); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/font-matrix-translation.c b/test/font-matrix-translation.c index b83a5277e..465ac7cf4 100644 --- a/test/font-matrix-translation.c +++ b/test/font-matrix-translation.c @@ -102,7 +102,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */ cairo_paint (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/ft-show-glyphs-positioning.c b/test/ft-show-glyphs-positioning.c index 64f6d3cc3..449f8eb1f 100644 --- a/test/ft-show-glyphs-positioning.c +++ b/test/ft-show-glyphs-positioning.c @@ -130,7 +130,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_paint (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/ft-show-glyphs-table.c b/test/ft-show-glyphs-table.c index e86f149f7..344392f40 100644 --- a/test/ft-show-glyphs-table.c +++ b/test/ft-show-glyphs-table.c @@ -70,7 +70,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_paint (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/ft-text-antialias-none.c b/test/ft-text-antialias-none.c index a6ab41c5c..64eea64f9 100644 --- a/test/ft-text-antialias-none.c +++ b/test/ft-text-antialias-none.c @@ -54,7 +54,7 @@ create_scaled_font (cairo_t * cr, if (pattern == NULL) return CAIRO_STATUS_NO_MEMORY; - FcPatternAddString (pattern, FC_FAMILY, (FcChar8 *)"Bitstream vera sans"); + FcPatternAddString (pattern, FC_FAMILY, (FcChar8 *) CAIRO_TEST_FONT_FAMILY " Sans"); FcPatternAddDouble (pattern, FC_SIZE, TEXT_SIZE); FcConfigSubstitute (NULL, pattern, FcMatchPattern); diff --git a/test/ft-text-vertical-layout-type3.c b/test/ft-text-vertical-layout-type3.c index 982680689..0cea9dd80 100644 --- a/test/ft-text-vertical-layout-type3.c +++ b/test/ft-text-vertical-layout-type3.c @@ -54,7 +54,7 @@ create_scaled_font (cairo_t * cr, if (pattern == NULL) return CAIRO_STATUS_NO_MEMORY; - FcPatternAddString (pattern, FC_FAMILY, (FcChar8 *)"Bitstream Vera Sans"); + FcPatternAddString (pattern, FC_FAMILY, (FcChar8 *)CAIRO_TEST_FONT_FAMILY " Sans"); FcPatternAddDouble (pattern, FC_PIXEL_SIZE, TEXT_SIZE); FcConfigSubstitute (NULL, pattern, FcMatchPattern); diff --git a/test/get-path-extents.c b/test/get-path-extents.c index 337dad2dd..a3e9554d1 100644 --- a/test/get-path-extents.c +++ b/test/get-path-extents.c @@ -292,7 +292,7 @@ draw (cairo_t *cr, int width, int height) phase = "Text"; cairo_save (cr2); - cairo_select_font_face (cr2, "Bitstream Vera Sans", + cairo_select_font_face (cr2, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr2, 12); diff --git a/test/glyph-cache-pressure.c b/test/glyph-cache-pressure.c index 9b0e3f378..770b39fd6 100644 --- a/test/glyph-cache-pressure.c +++ b/test/glyph-cache-pressure.c @@ -58,7 +58,7 @@ draw (cairo_t *cr, int width, int height) cairo_paint (cr); cairo_restore (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/inverse-text.c b/test/inverse-text.c index 555122085..c8d7aea62 100644 --- a/test/inverse-text.c +++ b/test/inverse-text.c @@ -41,17 +41,17 @@ draw (cairo_t *cr, int width, int height) cairo_set_font_size (cr, TEXT_SIZE); cairo_move_to (cr, 0, TEXT_SIZE); - cairo_select_font_face (cr, "Bitstream Vera Serif", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_show_text (cr, "i-am-serif"); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_show_text (cr, " i-am-sans"); - cairo_select_font_face (cr, "Bitstream Vera Sans Mono", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_show_text (cr, " i-am-mono"); diff --git a/test/large-font.c b/test/large-font.c index d9ba954ea..0a139441c 100644 --- a/test/large-font.c +++ b/test/large-font.c @@ -53,7 +53,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_rgb (cr, 1., 1., 1.); cairo_paint (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/operator-clear.c b/test/operator-clear.c index b294dc027..a1cf98100 100644 --- a/test/operator-clear.c +++ b/test/operator-clear.c @@ -149,7 +149,7 @@ draw (cairo_t *cr, int width, int height) size_t i, j, x, y; cairo_pattern_t *pattern; - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/operator-source.c b/test/operator-source.c index 8d7730761..c92b4ad72 100644 --- a/test/operator-source.c +++ b/test/operator-source.c @@ -186,7 +186,7 @@ draw (cairo_t *cr, int width, int height) size_t i, j, x, y; cairo_pattern_t *pattern; - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/overlapping-glyphs.c b/test/overlapping-glyphs.c index 690a6dd25..93067abc7 100644 --- a/test/overlapping-glyphs.c +++ b/test/overlapping-glyphs.c @@ -48,7 +48,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */ cairo_paint (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/pdf-features.c b/test/pdf-features.c index cc25fceab..31099c945 100644 --- a/test/pdf-features.c +++ b/test/pdf-features.c @@ -105,7 +105,7 @@ preamble (cairo_test_context_t *ctx) cr = cairo_create (surface); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/ps-features.c b/test/ps-features.c index 72fd21ab0..c1fb7308c 100644 --- a/test/ps-features.c +++ b/test/ps-features.c @@ -118,7 +118,7 @@ preamble (cairo_test_context_t *ctx) cr = cairo_create (surface); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/select-font-face.c b/test/select-font-face.c index 74c127693..ec4b27cf3 100644 --- a/test/select-font-face.c +++ b/test/select-font-face.c @@ -39,17 +39,17 @@ draw (cairo_t *cr, int width, int height) cairo_set_font_size (cr, TEXT_SIZE); cairo_move_to (cr, 0, TEXT_SIZE); - cairo_select_font_face (cr, "Bitstream Vera Serif", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_show_text (cr, "i-am-serif"); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_show_text (cr, " i-am-sans"); - cairo_select_font_face (cr, "Bitstream Vera Sans Mono", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_show_text (cr, " i-am-mono"); diff --git a/test/select-font-no-show-text.c b/test/select-font-no-show-text.c index 63b1eb278..0b7241530 100644 --- a/test/select-font-no-show-text.c +++ b/test/select-font-no-show-text.c @@ -44,7 +44,7 @@ static cairo_test_status_t draw (cairo_t *cr, int width, int height) { - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); diff --git a/test/show-text-current-point.c b/test/show-text-current-point.c index acf6d1c19..2fe32a82d 100644 --- a/test/show-text-current-point.c +++ b/test/show-text-current-point.c @@ -36,7 +36,7 @@ draw (cairo_t *cr, int width, int height) cairo_paint (cr); cairo_restore (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/smask-text.c b/test/smask-text.c index c00aca4a1..f36ae2674 100644 --- a/test/smask-text.c +++ b/test/smask-text.c @@ -57,7 +57,7 @@ draw (cairo_t *cr, int width, int height) cairo_pattern_destroy (pattern); cairo_select_font_face (cr2, - "Bitstream Vera Sans", + CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr2, 0.5 * height); diff --git a/test/smask.c b/test/smask.c index 867fb696e..4cf3adb2a 100644 --- a/test/smask.c +++ b/test/smask.c @@ -82,7 +82,7 @@ draw (cairo_t *cr, int width, int height) cairo_stroke (cr2); cairo_select_font_face (cr2, - "Bitstream Vera Sans", + CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr2, 0.3 * height); diff --git a/test/text-antialias-gray.c b/test/text-antialias-gray.c index cdc0e06fd..84143f04e 100644 --- a/test/text-antialias-gray.c +++ b/test/text-antialias-gray.c @@ -42,7 +42,7 @@ draw (cairo_t *cr, int width, int height) cairo_paint (cr); cairo_restore (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/text-antialias-none.c b/test/text-antialias-none.c index cd43f2a04..dbfcdee0e 100644 --- a/test/text-antialias-none.c +++ b/test/text-antialias-none.c @@ -42,7 +42,7 @@ draw (cairo_t *cr, int width, int height) cairo_paint (cr); cairo_restore (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/text-antialias-subpixel.c b/test/text-antialias-subpixel.c index 1a528d65c..e6eadc2a4 100644 --- a/test/text-antialias-subpixel.c +++ b/test/text-antialias-subpixel.c @@ -39,7 +39,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_paint (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/text-glyph-range.c b/test/text-glyph-range.c index f6422fee1..75b87d63a 100644 --- a/test/text-glyph-range.c +++ b/test/text-glyph-range.c @@ -69,7 +69,7 @@ draw (cairo_t *cr, int width, int height) cairo_paint (cr); cairo_restore (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, 16); diff --git a/test/text-pattern.c b/test/text-pattern.c index ad4419d7c..6508b5e30 100644 --- a/test/text-pattern.c +++ b/test/text-pattern.c @@ -33,7 +33,7 @@ draw (cairo_t *cr, int width, int height) { cairo_pattern_t *pat; - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/text-rotate.c b/test/text-rotate.c index cbc756c09..0a805ac67 100644 --- a/test/text-rotate.c +++ b/test/text-rotate.c @@ -137,7 +137,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_rgb (cr, 1., 1., 1.); cairo_paint (cr); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, TEXT_SIZE); diff --git a/test/text-transform.c b/test/text-transform.c index e5c0e351d..2cd7f100b 100644 --- a/test/text-transform.c +++ b/test/text-transform.c @@ -77,7 +77,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_source_rgb (cr, 0., 0., 0.); - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/text-zero-len.c b/test/text-zero-len.c index 3efb3efa8..5e89816c8 100644 --- a/test/text-zero-len.c +++ b/test/text-zero-len.c @@ -74,7 +74,7 @@ draw (cairo_t *cr, int width, int height) cairo_font_extents_t font_extents, nil_font_extents; cairo_scaled_font_t *scaled_font; - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, 16); diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c index af1442b9f..065bff91a 100644 --- a/test/unbounded-operator.c +++ b/test/unbounded-operator.c @@ -137,7 +137,7 @@ draw (cairo_t *cr, int width, int height) size_t i, j, x, y; cairo_pattern_t *pattern; - cairo_select_font_face (cr, "Bitstream Vera Sans", + cairo_select_font_face (cr, CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); diff --git a/test/user-font-rescale.c b/test/user-font-rescale.c index 8d2e8978e..3fe70f605 100644 --- a/test/user-font-rescale.c +++ b/test/user-font-rescale.c @@ -312,7 +312,7 @@ draw (cairo_t *cr, int width, int height) cairo_paint (cr); cairo_select_font_face (cr, - "Bitstream Vera Sans", + CAIRO_TEST_FONT_FAMILY " Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); @@ -328,7 +328,7 @@ draw (cairo_t *cr, int width, int height) /* same text in 'mono' with widths that match the 'sans' version */ old = cairo_font_face_reference (cairo_get_font_face (cr)); cairo_select_font_face (cr, - "Bitstream Vera Sans Mono", + CAIRO_TEST_FONT_FAMILY " Sans Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); substitute = cairo_get_font_face (cr); @@ -349,7 +349,7 @@ draw (cairo_t *cr, int width, int height) /* mono text */ cairo_select_font_face (cr, - "Bitstream Vera Sans Mono", + CAIRO_TEST_FONT_FAMILY " Sans Mono", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);