New issue
Advanced search Search tips

Issue 845697 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Regression in 66.0.3335.0 PDFs Print Incorrect Font Spacing-2

Project Member Reported by marchuk@chromium.org, May 22 2018

Issue description

ChromeOS version: 66.0.3335.0 
ChromeOS device model: Windows, Linux
Case#: 15713134 

Description:
As per
https://bugs.chromium.org/p/chromium/issues/detail?id=814530#c29
Raising new bug

Steps to reproduce: 
1. Open attached file
https://drive.google.com/file/d/1v2UK1c4zZQztDh33vT_vI8zWFYRY-imk/view?usp=sharing
2. Print to 'Microsoft Print to PDF' (easier to play with), can be any printer.

Current Behavior / Reproduction: 
Incorrect font spacing, as in 533139.pdf in https://drive.google.com/open?id=1ygw7CD2eN5nNTJr2_KCqFzJhzoe_Z8nO and 533139_img.png

Expected Behavior: 
Correct font spacing, as in 533105.pdf in https://drive.google.com/open?id=1ygw7CD2eN5nNTJr2_KCqFzJhzoe_Z8nO and 533105_img.png

I did a bisect (Chromium, I have no access to Chrome bisect):
533105 (known good), 
533139 (first known bad).

CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/e100126eadbdae92875a10f9bf157e9762b843a3..ffe3c1da26430bb842db30d618ae349f37b02725
 
533105_img.png
96.5 KB View Download
533139_img.png
130 KB View Download

Comment 1 by jayhlee@google.com, May 22 2018

Cc: -jayhlee@chromium.org
This is yet another PDF that does not embed fonts and instead replies on font substitution to magically work.
Cc: npm@chromium.org
I can't reproduce. On Windows, printing to 'Microsoft Print to PDF', the output PDF looks exact the same with 533110 and 533150. I guess my machine got the same font substitution and yours didn't?

From the bisect range, this is probably due to something in r533128, so most likely https://pdfium.googlesource.com/pdfium.git/+/23346600 ?

Comment 4 by npm@chromium.org, May 23 2018

I do get incorrect font spacing when doing Microsoft Print to PDF. I guess I'll need to check that without my CL the output is different

Comment 5 by npm@chromium.org, May 28 2018

Tried printing on Linux. I get the same result with my change and with my manual revert of my change (https://pdfium-review.googlesource.com/c/pdfium/+/33030). Time to compile on Windows and see what happens.

Comment 6 by npm@chromium.org, May 28 2018

Cc: -npm@chromium.org thestig@chromium.org
Owner: npm@chromium.org
Status: Assigned (was: Untriaged)
Microsoft Print to PDF reproduces the problem on TOT but doesn't with the revert, so I can be blamed for this.
Project Member

Comment 7 by bugdroid1@chromium.org, May 31 2018

The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c

commit 8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c
Author: Nicolas Pena <npm@chromium.org>
Date: Thu May 31 00:32:14 2018

Fix font regression in AdjustMMParams

Commit 2334660 changed the |dest_width| in CFX_Font::AdjustMMParams to
unsigned, but this means that dest_width - min_width becomes unsigned,
which is wrong because the subtraction could be negative. This CL fixes
this bug.

Bug:  chromium:845697 
Change-Id: I88fb2f3ee3837d80ff5fa70a08309d9e0fec50e0
Reviewed-on: https://pdfium-review.googlesource.com/33150
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>

[add] https://crrev.com/8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c/testing/resources/pixel/bug_845697.in
[add] https://crrev.com/8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c/testing/resources/pixel/bug_845697_expected.pdf.0.png
[modify] https://crrev.com/8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c/core/fxge/cfx_font.h
[modify] https://crrev.com/8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c/core/fxge/cfx_font.cpp

Project Member

Comment 8 by bugdroid1@chromium.org, May 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/19cf2567bc51236d1d545742cc945e6292916e74

commit 19cf2567bc51236d1d545742cc945e6292916e74
Author: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Date: Thu May 31 08:24:45 2018

Roll src/third_party/pdfium a3aec9a..8f7ee98 (2 commits)

https://pdfium.googlesource.com/pdfium.git/+log/a3aec9a..8f7ee98


git log a3aec9a..8f7ee98 --date=short --no-merges --format='%ad %ae %s'
2018-05-31 npm@chromium.org Fix font regression in AdjustMMParams
2018-05-31 npm@chromium.org Add alphabetical order per file check in api_check.py

Created with:
  gclient setdep -r src/third_party/pdfium@8f7ee98

The AutoRoll server is located here: https://pdfium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.



BUG= chromium:845697 

TBR=dsinclair@chromium.org

Change-Id: I841363aedab1f1f5b021e81675b517b0bb24b144
Reviewed-on: https://chromium-review.googlesource.com/1080371
Reviewed-by: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Commit-Queue: pdfium-chromium-autoroll <pdfium-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#563182}
[modify] https://crrev.com/19cf2567bc51236d1d545742cc945e6292916e74/DEPS

Comment 9 by npm@chromium.org, May 31 2018

Status: Fixed (was: Assigned)
marchuk@ is it ok the fix be in M69 or do you want me to request a merge for M68?

Comment 10 by jayhlee@google.com, May 31 2018

Labels: -M-66 Merge-Request-68
Let's merge to 68 if it's not overly complicated to do so.

Igor, can you verify the fix in canary and mark this as verified if you can confirm?
Project Member

Comment 11 by sheriffbot@chromium.org, Jun 1 2018

Labels: -Merge-Request-68 Hotlist-Merge-Review Merge-Review-68
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-68 Merge-Approved-68
Approving merge to M68. Branch:3440
Project Member

Comment 13 by bugdroid1@chromium.org, Jun 1 2018

Labels: -merge-approved-68 merge-merged-3440
The following revision refers to this bug:
  https://pdfium.googlesource.com/pdfium/+/b27de7c64c5e9b949f3a76f962abdc2fa5c524e8

commit b27de7c64c5e9b949f3a76f962abdc2fa5c524e8
Author: Nicolas Pena <npm@chromium.org>
Date: Fri Jun 01 21:10:33 2018

Fix font regression in AdjustMMParams

Commit 2334660 changed the |dest_width| in CFX_Font::AdjustMMParams to
unsigned, but this means that dest_width - min_width becomes unsigned,
which is wrong because the subtraction could be negative. This CL fixes
this bug.

Bug:  chromium:845697 
Change-Id: I88fb2f3ee3837d80ff5fa70a08309d9e0fec50e0
Reviewed-on: https://pdfium-review.googlesource.com/33150
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
(cherry picked from commit 8f7ee98e2c622c21f452cd9fd5956fe85bcb2b7c)
Reviewed-on: https://pdfium-review.googlesource.com/33610
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>

[add] https://crrev.com/b27de7c64c5e9b949f3a76f962abdc2fa5c524e8/testing/resources/pixel/bug_845697.in
[add] https://crrev.com/b27de7c64c5e9b949f3a76f962abdc2fa5c524e8/testing/resources/pixel/bug_845697_expected.pdf.0.png
[modify] https://crrev.com/b27de7c64c5e9b949f3a76f962abdc2fa5c524e8/core/fxge/cfx_font.h
[modify] https://crrev.com/b27de7c64c5e9b949f3a76f962abdc2fa5c524e8/core/fxge/cfx_font.cpp

Sign in to add a comment