Ignore:
Timestamp:
Dec 21, 2008, 8:03:13 AM (13 years ago)
Author:
Eugene Romanenko
Message:

PDF plugin: Poppler library updated to version 0.10.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/poppler/CairoOutputDev.cc

    r257 r261  
    400400void CairoOutputDev::updateFont(GfxState *state) {
    401401  cairo_font_face_t *font_face;
    402   cairo_matrix_t matrix;
     402  cairo_matrix_t matrix, invert_matrix;
    403403
    404404  LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString()));
     
    431431  matrix.x0 = 0;
    432432  matrix.y0 = 0;
     433
     434 /* Make sure the font matrix is invertible before setting it.  cairo
     435  * will blow up if we give it a matrix that's not invertible, so we
     436  * need to check before passing it to cairo_set_font_matrix. Ignoring it
     437  * is likely to give better results than not rendering anything at
     438  * all. See #18254.
     439  */
     440  invert_matrix = matrix;
     441  if (cairo_matrix_invert(&invert_matrix)) {
     442    warning("font matrix not invertible\n");
     443    return;
     444  }
     445
    433446  cairo_set_font_matrix (cairo, &matrix);
    434447}
Note: See TracChangeset for help on using the changeset viewer.