OpenPrinting / libppd

Apache License 2.0
2 stars 16 forks source link

ppd-cache.c: Use 0.5mm for delta when comparing sizes #46

Closed zdohnal closed 4 months ago

zdohnal commented 4 months ago

@szlt5 found out libppd does not use the same delta as CUPS, which causes filters to use first size from the array, because the similar size according PWG (which recommends max delta 0.5mm) is not matched as useable.

Related to #29, but not fixing the original issue.

@szlt5 thank you for finding it!

szlt5 commented 4 months ago

@tillkamppeter So fast to approve...

@zdohnal Thanks, but the fix is ​​incomplete. There is another macro _PPD_PWG_EQUIVALENT in the ppd-ipp.c. Both the https://github.com/OpenPrinting/libppd/issues/29 and mine can be fixed after update the macro _PPD_PWG_EQUIVALENT in the ppd-ipp.c. I have tested them.

zdohnal commented 4 months ago

@szlt5 I'm sorry, I have pushed the additional change now (@tillkamppeter I took the liberty to do it without review, since it is the same fix). I was testing the fix myself too and I concur it works. @szlt5 thanks for the help!

zdohnal commented 4 months ago

I have the additional change prepared in the branch once I saw @szlt5 comment, but I was too slow :D .