gtk_paper_size_new has rounding issues
Steps to reproduce
- call
gtk_paper_size_new("na_letter_8.5x11in")
(name as taken from CUPS) - Expect the
gtk_paper_size_new_from_info
codepath to be taken, so that eventually the cups job ends up with aLetter
page size, since otherwise some printer drivers have issues, see https://bugzilla.mozilla.org/show_bug.cgi?id=1691798 - Instead the "fallback" codepath is used, because in that function:
(rr) p width
$25 = 215.89999999999998
(rr) p height
$26 = 279.39999999999998
(rr) p info->width
$27 = 215.899994
(rr) p info->height
$28 = 279.399994
Seems like gtk_paper_info_new_from_ipp
does have some tolerance for these kinds of issues. Alternatively, I could also check for a given set of CUPS paper names and translate to the GTK equivalents, but it seems this is an issue worth reporting anyways.