diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2008-05-04 22:46:41 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2008-05-04 22:46:41 +0930 |
commit | 158d24412bba99a4f57907d7fd22a86aae6e87af (patch) | |
tree | cf53201298fc564c613f6695f9836b4c458c63e2 /src/cairo-win32-printing-surface.c | |
parent | 547e2f552cff264b943803d3a1ff03d05bde35c0 (diff) |
Make win32-printing surface work with bitmap fonts
The win32 printing surface has the same problem with bitmap fonts as
it does with Type 1 fonts. ie ExtTextOutW() with glyph indices works
for a display DC but not a printer DC.
Fix this by forcing fallback for bitmap fonts.
Diffstat (limited to 'src/cairo-win32-printing-surface.c')
-rw-r--r-- | src/cairo-win32-printing-surface.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cairo-win32-printing-surface.c b/src/cairo-win32-printing-surface.c index 22379e25..791eb913 100644 --- a/src/cairo-win32-printing-surface.c +++ b/src/cairo-win32-printing-surface.c @@ -1311,6 +1311,20 @@ _cairo_win32_printing_surface_show_glyphs (void *abstract_surfac } if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { + /* Calling ExtTextOutW() with ETO_GLYPH_INDEX and a Type 1 or + * bitmap font on a printer DC prints garbled text. The text + * displays correctly on a display DC. It appears that when + * using a printer DC. ExtTextOutW() only works with + * characters and not glyph indices. + * + * For now we don't use ExtTextOutW for Type 1 or bitmap + * fonts. These fonts will go through the fallback path for + * non Windows fonts. ie filled outlines for Type 1 fonts and + * fallback images for bitmap fonts. + */ + if (_cairo_win32_scaled_font_is_bitmap (scaled_font)) + return CAIRO_INT_STATUS_UNSUPPORTED; + 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)) { |