mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-29 03:00:30 +01:00
win32: Fix broken printing of type1 fonts
ExtTextOut() does not work with Type 1 font glyph indices when printing. The same code works fine when dst->dc is a display. It appears that ExtTextOut expects unicode character values when using Type 1 fonts and a printer DC. Fix this by making Type 1 fonts in the win32-printing surface use the fallback path for non Windows fonts. ie the glyphs will be emitted as filled paths.
This commit is contained in:
parent
af94b8d2a3
commit
d96fdd58ab
3 changed files with 14 additions and 0 deletions
|
|
@ -490,6 +490,16 @@ _cairo_win32_scaled_font_select_unscaled_font (cairo_scaled_font_t *scaled_font,
|
|||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
cairo_bool_t
|
||||
_cairo_win32_scaled_font_is_type1 (cairo_scaled_font_t *scaled_font)
|
||||
{
|
||||
cairo_win32_scaled_font_t *win32_scaled_font;
|
||||
|
||||
win32_scaled_font = (cairo_win32_scaled_font_t *) scaled_font;
|
||||
|
||||
return win32_scaled_font->is_type1;
|
||||
}
|
||||
|
||||
static void
|
||||
_cairo_win32_scaled_font_done_unscaled_font (cairo_scaled_font_t *scaled_font)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1341,6 +1341,7 @@ _cairo_win32_printing_surface_show_glyphs (void *abstract_surfac
|
|||
}
|
||||
|
||||
if (cairo_scaled_font_get_type (scaled_font) == CAIRO_FONT_TYPE_WIN32 &&
|
||||
! _cairo_win32_scaled_font_is_type1 (scaled_font) &&
|
||||
source->type == CAIRO_PATTERN_TYPE_SOLID)
|
||||
{
|
||||
cairo_matrix_t ctm;
|
||||
|
|
|
|||
|
|
@ -181,4 +181,7 @@ _cairo_win32_restore_initial_clip (cairo_win32_surface_t *surface);
|
|||
void
|
||||
_cairo_win32_debug_dump_hrgn (HRGN rgn, char *header);
|
||||
|
||||
cairo_bool_t
|
||||
_cairo_win32_scaled_font_is_type1 (cairo_scaled_font_t *scaled_font);
|
||||
|
||||
#endif /* CAIRO_WIN32_PRIVATE_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue