diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-01-24 23:35:06 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-01-24 23:35:06 -0500 |
commit | efd3a965244305a069ec231b7ec28cff8d6c67c8 (patch) | |
tree | c35bd7040883c3b4baa3f3c440a84f92ec5f1b79 /src/cairo-pdf-surface.c | |
parent | 45f269e33020d8d7cf247926712b9c64c1fb8959 (diff) |
[cairo-scaled-font] Don't err on font size 0, really
First, seems like we were rejecting degenerate font matrix right away
at the constructor. Don't do that.
Next, PS/PDF were inverting the font scale matrix, assuming that it's
invertible. We now keep the inverse too, so they can use it. For the
case of a size 0 font, both the scale matrix and its invert are set to
0,0,0,0. That's safe, even if slightly inconsistent.
Diffstat (limited to 'src/cairo-pdf-surface.c')
-rw-r--r-- | src/cairo-pdf-surface.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 075fb05b..77fd95b9 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -3575,10 +3575,7 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t *surface, } _cairo_pdf_surface_update_object (surface, subset_resource); - matrix = font_subset->scaled_font->scale; - status = cairo_matrix_invert (&matrix); - /* _cairo_scaled_font_init ensures the matrix is invertible */ - assert (status == CAIRO_STATUS_SUCCESS); + matrix = font_subset->scaled_font->scale_inverse; _cairo_output_stream_printf (surface->output, "%d 0 obj\r\n" "<< /Type /Font\r\n" |