Replace EM_ADJUST macro usage with NormalizeFontMetric() [pdfium : main]

0 views
Skip to first unread message

Aryan Krishnan (Gerrit)

unread,
2:08 PM (2 hours ago) 2:08 PM
to pdfium...@luci-project-accounts.iam.gserviceaccount.com, Lei Zhang, Tom Sepez, Andy Phan, pdfium-...@googlegroups.com
Attention needed from Andy Phan, Lei Zhang and Tom Sepez

Aryan Krishnan voted and added 2 comments

Votes added by Aryan Krishnan

Commit-Queue+1

2 comments

Patchset-level comments
File-level comment, Patchset 2:
Andy Phan . unresolved

The CL seems fine as a mechanical change, but maybe this should actually use NormalizeFontMetric() instead. There's multiple uses of it in the same file.

Aryan Krishnan

I assume you meant replace EmAdjust with NormalizeFontMetric. Done, also repurposed the <cmath> include for `std::roundll()` as a way to combine the + 0.5 and static_cast<> steps.

File core/fxge/cfx_face.cpp
Line 9, Patchset 2:#include <cmath>
Andy Phan . resolved

Unrelated to this CL, but maybe for std::abs()?

Aryan Krishnan

Not sure what you meant but the import was just me experimenting with `std::roundll()`, which I now added in the latest patchset.

Open in Gerrit

Related details

Attention is currently required from:
  • Andy Phan
  • Lei Zhang
  • Tom Sepez
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: pdfium
Gerrit-Branch: main
Gerrit-Change-Id: Id5f1b472391a4da169e977188ea6d46db6a8c129
Gerrit-Change-Number: 149110
Gerrit-PatchSet: 4
Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
Gerrit-Reviewer: Aryan Krishnan <aryankr...@gmail.com>
Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Lei Zhang <the...@chromium.org>
Gerrit-Attention: Tom Sepez <tse...@chromium.org>
Gerrit-Attention: Andy Phan <andy...@chromium.org>
Gerrit-Comment-Date: Thu, 04 Jun 2026 18:07:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Andy Phan <andy...@chromium.org>
unsatisfied_requirement
open
diffy

Aryan Krishnan (Gerrit)

unread,
2:08 PM (2 hours ago) 2:08 PM
to pdfium...@luci-project-accounts.iam.gserviceaccount.com, Lei Zhang, Tom Sepez, Andy Phan, pdfium-...@googlegroups.com
Attention needed from Andy Phan, Lei Zhang and Tom Sepez

Aryan Krishnan added 1 comment

Patchset-level comments

The CL seems fine as a mechanical change, but maybe this should actually use NormalizeFontMetric() instead. There's multiple uses of it in the same file.

Aryan Krishnan

I assume you meant replace EmAdjust with NormalizeFontMetric. Done, also repurposed the <cmath> include for `std::roundll()` as a way to combine the + 0.5 and static_cast<> steps.

Aryan Krishnan

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Andy Phan
  • Lei Zhang
  • Tom Sepez
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: pdfium
    Gerrit-Branch: main
    Gerrit-Change-Id: Id5f1b472391a4da169e977188ea6d46db6a8c129
    Gerrit-Change-Number: 149110
    Gerrit-PatchSet: 4
    Gerrit-Owner: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Andy Phan <andy...@chromium.org>
    Gerrit-Reviewer: Aryan Krishnan <aryankr...@gmail.com>
    Gerrit-Reviewer: Lei Zhang <the...@chromium.org>
    Gerrit-Reviewer: Tom Sepez <tse...@chromium.org>
    Gerrit-Attention: Lei Zhang <the...@chromium.org>
    Gerrit-Attention: Tom Sepez <tse...@chromium.org>
    Gerrit-Attention: Andy Phan <andy...@chromium.org>
    Gerrit-Comment-Date: Thu, 04 Jun 2026 18:08:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Aryan Krishnan <aryankr...@gmail.com>
    Comment-In-Reply-To: Andy Phan <andy...@chromium.org>
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages