Skip to content

Commit

Permalink
ppd-cache.c: Use 0.5mm for delta when comparing sizes
Browse files Browse the repository at this point in the history
@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 OpenPrinting#29, but not fixing the original issue.
  • Loading branch information
zdohnal committed Aug 2, 2024
1 parent 168f93d commit 7ec5075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ppd/ppd-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// Macro to test for two almost-equal PWG measurements.
//

#define _PPD_PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 2)
#define _PPD_PWG_EQUIVALENT(x, y) (abs((x)-(y)) < 50)

//
// Macros to work around typos in older libcups version
Expand Down

2 comments on commit 7ec5075

@szlt5
Copy link

@szlt5 szlt5 commented on 7ec5075 Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zdohnal Thanks, but there is another macro _PPD_PWG_EQUIVALENT in the ppd-ipp.c

@szlt5
Copy link

@szlt5 szlt5 commented on 7ec5075 Aug 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zdohnal both the OpenPrinting#29 and mine can be fixed after update the macro _PPD_PWG_EQUIVALENT in the ppd-ipp.c. I have tested them.

Please sign in to comment.