Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Issue 844083002: Get all font unittests running with DirectWrite on Windows 7+ (Closed)

Created:
5 years, 11 months ago by ananta
Modified:
5 years, 10 months ago
CC:
chromium-reviews, Alexei Svitkine (slow), Daniel Erat, ckocagil
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Get all font unittests running with DirectWrite on Windows 7+ Fixes as per below:- 1. Remove the addition of the fLeading value when calculating the height for the font with DirectWrite. fAscent + fDescent is the height of the font and adding the fLeading value to it returns the spacing between lines which is not what we are looking for. 2. The FontListTest.Fonts_GetHeight_GetBaseline unittest has a condition which basically validates whether the difference between the font height and the baseline is different for Arial and Symbol fonts. This fails for DirectWrite and fails for GDI with font sizes like 50, etc. Replaced this check with a check for the font heights are different. 3. Reworked the PlatformFontWinTest.DeriveFontWithHeight test to ensure it passes for DirectWrite and GDI. BUG=442010 R=msw Committed: https://crrev.com/58063de6b256e760e838af217bbc992b64f1cb59 Cr-Commit-Position: refs/heads/master@{#311178}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed review comments #

Patch Set 3 : Removed unused function #

Patch Set 4 : Fixed comment #

Patch Set 5 : Fix presubmit #

Total comments: 8

Patch Set 6 : Address review comments #

Patch Set 7 : Fix DeriveFontWithHeight for increasing font size #

Patch Set 8 : Reworded comment #

Total comments: 7

Patch Set 9 : CreateFontIndirect at start of the DeriveFontWithHeight function #

Total comments: 6

Patch Set 10 : Address review comments #

Patch Set 11 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -107 lines) Patch
M ui/gfx/font_list_unittest.cc View 1 2 3 4 5 1 chunk +6 lines, -7 lines 0 comments Download
M ui/gfx/platform_font_win.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
M ui/gfx/platform_font_win.cc View 1 2 3 4 5 6 7 8 9 4 chunks +20 lines, -44 lines 0 comments Download
M ui/gfx/platform_font_win_unittest.cc View 1 2 3 4 5 6 2 chunks +11 lines, -52 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
ananta
5 years, 11 months ago (2015-01-09 23:06:08 UTC) #2
msw
https://codereview.chromium.org/844083002/diff/1/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/844083002/diff/1/ui/gfx/font_list_unittest.cc#newcode269 ui/gfx/font_list_unittest.cc:269: // for ascent and descent. nit: "for the baseline ...
5 years, 11 months ago (2015-01-09 23:40:22 UTC) #3
ananta
https://codereview.chromium.org/844083002/diff/1/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/844083002/diff/1/ui/gfx/font_list_unittest.cc#newcode269 ui/gfx/font_list_unittest.cc:269: // for ascent and descent. On 2015/01/09 23:40:22, msw ...
5 years, 11 months ago (2015-01-10 00:43:15 UTC) #5
msw
https://codereview.chromium.org/844083002/diff/100001/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/844083002/diff/100001/ui/gfx/font_list_unittest.cc#newcode279 ui/gfx/font_list_unittest.cc:279: // descent of FontList == max(descent of Fonts) The ...
5 years, 11 months ago (2015-01-10 01:50:15 UTC) #6
ananta
https://codereview.chromium.org/844083002/diff/100001/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/844083002/diff/100001/ui/gfx/font_list_unittest.cc#newcode279 ui/gfx/font_list_unittest.cc:279: // descent of FontList == max(descent of Fonts) On ...
5 years, 11 months ago (2015-01-10 02:05:49 UTC) #7
msw
https://codereview.chromium.org/844083002/diff/100001/ui/gfx/platform_font_win_unittest.cc File ui/gfx/platform_font_win_unittest.cc (right): https://codereview.chromium.org/844083002/diff/100001/ui/gfx/platform_font_win_unittest.cc#newcode28 ui/gfx/platform_font_win_unittest.cc:28: // Ideally a derived font should have its height ...
5 years, 11 months ago (2015-01-10 02:28:33 UTC) #8
ananta
https://codereview.chromium.org/844083002/diff/100001/ui/gfx/platform_font_win_unittest.cc File ui/gfx/platform_font_win_unittest.cc (right): https://codereview.chromium.org/844083002/diff/100001/ui/gfx/platform_font_win_unittest.cc#newcode28 ui/gfx/platform_font_win_unittest.cc:28: // Ideally a derived font should have its height ...
5 years, 11 months ago (2015-01-12 20:10:31 UTC) #9
msw
This looks pretty good, but can you test the performance impact quickly? Font derivations are ...
5 years, 11 months ago (2015-01-12 21:30:55 UTC) #10
ananta
https://codereview.chromium.org/844083002/diff/160001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/844083002/diff/160001/ui/gfx/platform_font_win.cc#newcode233 ui/gfx/platform_font_win.cc:233: // We derive a font with a size delta ...
5 years, 11 months ago (2015-01-12 22:14:15 UTC) #11
msw
lgtm with nits, thanks! https://codereview.chromium.org/844083002/diff/180001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/844083002/diff/180001/ui/gfx/platform_font_win.cc#newcode215 ui/gfx/platform_font_win.cc:215: LOGFONT font_info; nit: Add a ...
5 years, 11 months ago (2015-01-12 22:29:29 UTC) #12
Alexei Svitkine (slow)
https://codereview.chromium.org/844083002/diff/180001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/844083002/diff/180001/ui/gfx/platform_font_win.cc#newcode240 ui/gfx/platform_font_win.cc:240: while (font.GetHeight() <= height) { Have you checked whether ...
5 years, 11 months ago (2015-01-12 23:00:43 UTC) #14
ananta
https://codereview.chromium.org/844083002/diff/180001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/844083002/diff/180001/ui/gfx/platform_font_win.cc#newcode215 ui/gfx/platform_font_win.cc:215: LOGFONT font_info; On 2015/01/12 22:29:29, msw wrote: > nit: ...
5 years, 11 months ago (2015-01-12 23:08:02 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/844083002/220001
5 years, 11 months ago (2015-01-13 01:07:04 UTC) #17
commit-bot: I haz the power
Committed patchset #11 (id:220001)
5 years, 11 months ago (2015-01-13 01:59:27 UTC) #18
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/58063de6b256e760e838af217bbc992b64f1cb59 Cr-Commit-Position: refs/heads/master@{#311178}
5 years, 11 months ago (2015-01-13 02:01:02 UTC) #19
jochen (gone - plz use gerrit)
5 years, 11 months ago (2015-01-13 09:18:01 UTC) #20
Message was sent while issue was closed.
A revert of this CL (patchset #11 id:220001) has been created in
https://codereview.chromium.org/820173005/ by jochen@chromium.org.

The reason for reverting is: breaks PlatformFontWinTest.DeriveFontWithHeight on
xp and vista.

Powered by Google App Engine
This is Rietveld 408576698