[pdf] Use DW when it is an integer
This is a follow up to a previous change in which DW (Default Width) use
was disabled [0]. For some reason, the PDF standard declared DW an
integer even though advances are numbers (integer or real) everywhere
else. Unfortunately, libpoppler appears to enforce this restriction and
will use the default value of 1000 if DW is not an integer (like if it
is a real). As a result, use of DW in Skia generated PDFs was disabled
to avoid issues.
This change restores the use of DW by only considering integer advances
as candidates.
[0] https://skia.googlesource.com/skia/+/6be3ea7a7d72a6a76efcbedf67dbfde465b1a9d9
Change-Id: I724bb83989b7f8b1a8340890814ce43d27fdc822
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/708394
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
3 files changed