diff options
Diffstat (limited to 'cups/pwg-media.c')
-rw-r--r-- | cups/pwg-media.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cups/pwg-media.c b/cups/pwg-media.c index 62455ea6d..0c6e44bc3 100644 --- a/cups/pwg-media.c +++ b/cups/pwg-media.c @@ -1,7 +1,7 @@ /* * PWG media name API implementation for CUPS. * - * Copyright 2009-2017 by Apple Inc. + * Copyright 2009-2019 by Apple Inc. * * These coded instructions, statements, and computer programs are the * property of Apple Inc. and are protected by Federal copyright @@ -26,6 +26,7 @@ #define _PWG_MEDIA_IN(p,l,a,x,y) {p, l, a, (int)(x * 2540), (int)(y * 2540)} #define _PWG_MEDIA_MM(p,l,a,x,y) {p, l, a, (int)(x * 100), (int)(y * 100)} +#define _PWG_EPSILON 50 /* Matching tolerance */ /* @@ -912,10 +913,11 @@ pwgMediaForSize(int width, /* I - Width in hundredths of millimeters */ { /* * Adobe uses a size matching algorithm with an epsilon of 5 points, which - * is just about 176/2540ths... + * is just about 176/2540ths... But a lot of international media sizes are + * very close so use 0.5mm (50/2540ths) as the maximum delta. */ - return (_pwgMediaNearSize(width, length, 176)); + return (_pwgMediaNearSize(width, length, _PWG_EPSILON)); } |