Comment 160 for bug 179988

Revision history for this message
Rygle (rygle) wrote :

Here's what I'm working on at the moment for ui\dialog\print.cpp - will do a build soon and see if it works. This should allow us to work with Cairo whether it has a scaling bug or not.

======
    // Alternative Fallback 1. Set resolution of fallback to printer resolution. If everything is working properly this will set the resolution much higher than actually needed as printer halftoning means laser printers don't need much more than 300dpi. Leave commented unless you know what you're doing.
    // cairo_surface_set_fallback_resolution (surface, x_dpi, y_dpi);

    // Alternative fallback 2. Set fallback to 300 dpi, compensating for cairo scaling bug
    // cairo_surface_set_fallback_resolution (surface, (x_dpi/72) *300, (y_dpi/72) *300);

    // Alternative fallback 3. Conditional fallback -> 300dpi, only if the dpi is set to less than 100dpi due to cairo bug.
    if x_dpi < 100 {
       cairo_surface_set_fallback_resolution (surface, (x_dpi/72.0) * 300, (y_dpi/72.0) * 300);
 }
======