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

Issue 853553002: Relanding this with font test fixes for gdi. (Closed)

Created:
5 years, 11 months ago by ananta
Modified:
5 years, 11 months ago
Reviewers:
msw
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Relanding this with font test fixes for gdi. 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. 4. Ensure that the PlatformFontWin::DeriveFontWithHeight function honors the minimum font size constraint in all cases. BUG=442010 R=msw Committed: https://crrev.com/3e05f41653bf36cce40718d8295ce2293218dab6 Cr-Commit-Position: refs/heads/master@{#311388}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Update comment #

Patch Set 3 : Address review comments #

Total comments: 3

Patch Set 4 : DeriveFontWithHeight starts with a font matching the minimum size #

Total comments: 8

Patch Set 5 : Remove if height check #

Total comments: 2

Patch Set 6 : Removed the CreateFontWithHeight function and addressed comments #

Total comments: 2

Patch Set 7 : Removed trailing quote #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -117 lines) Patch
M ui/gfx/font_list_unittest.cc View 1 2 3 4 5 6 1 chunk +6 lines, -6 lines 0 comments Download
M ui/gfx/platform_font_win.h View 1 2 3 4 5 2 chunks +4 lines, -9 lines 0 comments Download
M ui/gfx/platform_font_win.cc View 1 2 3 4 5 3 chunks +33 lines, -53 lines 0 comments Download
M ui/gfx/platform_font_win_unittest.cc View 2 chunks +8 lines, -49 lines 0 comments Download

Messages

Total messages: 14 (1 generated)
ananta
5 years, 11 months ago (2015-01-13 21:08:02 UTC) #1
msw
https://codereview.chromium.org/853553002/diff/1/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/853553002/diff/1/ui/gfx/font_list_unittest.cc#newcode274 ui/gfx/font_list_unittest.cc:274: EXPECT_NE(font1.GetHeight(), font2.GetHeight()); nit: can you leave this check as ...
5 years, 11 months ago (2015-01-13 21:59:57 UTC) #2
ananta
https://codereview.chromium.org/853553002/diff/1/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/853553002/diff/1/ui/gfx/font_list_unittest.cc#newcode274 ui/gfx/font_list_unittest.cc:274: EXPECT_NE(font1.GetHeight(), font2.GetHeight()); On 2015/01/13 21:59:57, msw wrote: > nit: ...
5 years, 11 months ago (2015-01-13 22:21:46 UTC) #3
msw
https://codereview.chromium.org/853553002/diff/1/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/853553002/diff/1/ui/gfx/font_list_unittest.cc#newcode269 ui/gfx/font_list_unittest.cc:269: // for the baseline (ascent) and height. nit: revert ...
5 years, 11 months ago (2015-01-13 22:43:59 UTC) #4
ananta
https://codereview.chromium.org/853553002/diff/1/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/853553002/diff/1/ui/gfx/font_list_unittest.cc#newcode274 ui/gfx/font_list_unittest.cc:274: EXPECT_NE(font1.GetHeight(), font2.GetHeight()); On 2015/01/13 22:43:59, msw wrote: > On ...
5 years, 11 months ago (2015-01-13 23:39:40 UTC) #5
msw
I don't think this is the right way to go. https://codereview.chromium.org/853553002/diff/60001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/853553002/diff/60001/ui/gfx/platform_font_win.cc#newcode524 ...
5 years, 11 months ago (2015-01-13 23:54:59 UTC) #6
ananta
https://codereview.chromium.org/853553002/diff/60001/ui/gfx/platform_font_win.cc File ui/gfx/platform_font_win.cc (right): https://codereview.chromium.org/853553002/diff/60001/ui/gfx/platform_font_win.cc#newcode524 ui/gfx/platform_font_win.cc:524: HFONT PlatformFontWin::CreateFontWithHeight(int height, int style) { On 2015/01/13 23:54:59, ...
5 years, 11 months ago (2015-01-14 00:17:24 UTC) #7
msw
lgtm with a nit, thanks! https://codereview.chromium.org/853553002/diff/100001/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/853553002/diff/100001/ui/gfx/font_list_unittest.cc#newcode274 ui/gfx/font_list_unittest.cc:274: // TODO(ananta): Find a ...
5 years, 11 months ago (2015-01-14 00:33:09 UTC) #8
ananta
https://codereview.chromium.org/853553002/diff/100001/ui/gfx/font_list_unittest.cc File ui/gfx/font_list_unittest.cc (right): https://codereview.chromium.org/853553002/diff/100001/ui/gfx/font_list_unittest.cc#newcode274 ui/gfx/font_list_unittest.cc:274: // TODO(ananta): Find a size and font pair with ...
5 years, 11 months ago (2015-01-14 00:35:46 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/853553002/120001
5 years, 11 months ago (2015-01-14 00:37:21 UTC) #11
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 11 months ago (2015-01-14 01:35:29 UTC) #12
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/3e05f41653bf36cce40718d8295ce2293218dab6 Cr-Commit-Position: refs/heads/master@{#311388}
5 years, 11 months ago (2015-01-14 01:36:55 UTC) #13
jochen (gone - plz use gerrit)
5 years, 11 months ago (2015-01-14 07:47:07 UTC) #14
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:120001) has been created in
https://codereview.chromium.org/847283003/ by jochen@chromium.org.

The reason for reverting is: still fails on XP

https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/build....

Powered by Google App Engine
This is Rietveld 408576698