mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-27 02:20:16 +01:00
Change user-font-rescale test to use opaque colors
The combination of the initial cairo_paint() and the translucent text colors were causing image fallbacks that prevented the PS type 3 font embedding from being tested.
This commit is contained in:
parent
840218e0a0
commit
e880d0f956
3 changed files with 3 additions and 3 deletions
BIN
test/user-font-rescale-ps-ref.png
Normal file
BIN
test/user-font-rescale-ps-ref.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 16 KiB |
|
|
@ -311,7 +311,7 @@ draw (cairo_t *cr, int width, int height)
|
|||
cairo_font_extents (cr, &font_extents);
|
||||
cairo_text_extents (cr, text, &extents);
|
||||
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 0.5);
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_move_to (cr, BORDER, BORDER + font_extents.ascent);
|
||||
cairo_show_text (cr, text);
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ draw (cairo_t *cr, int width, int height)
|
|||
rescaled = get_user_font_face (cairo_get_font_face (cr), text, old);
|
||||
cairo_set_font_face (cr, rescaled);
|
||||
|
||||
cairo_set_source_rgba (cr, 0, 0, 1, 0.5);
|
||||
cairo_set_source_rgb (cr, 0, 0, 1);
|
||||
cairo_move_to (cr, BORDER, BORDER + font_extents.height + 2*BORDER + font_extents.ascent);
|
||||
cairo_show_text (cr, text);
|
||||
|
||||
|
|
@ -336,7 +336,7 @@ draw (cairo_t *cr, int width, int height)
|
|||
CAIRO_FONT_SLANT_NORMAL,
|
||||
CAIRO_FONT_WEIGHT_NORMAL);
|
||||
|
||||
cairo_set_source_rgba (cr, 0, 0, 1, 0.5);
|
||||
cairo_set_source_rgb (cr, 0, 0, 1);
|
||||
cairo_move_to (cr, BORDER, BORDER + 2*font_extents.height + 4*BORDER + font_extents.ascent);
|
||||
cairo_show_text (cr, text);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue