diff options
author | jochen <jochen@chromium.org> | 2015-01-13 01:19:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-13 09:21:33 +0000 |
commit | e34da193dd4c80adf30c63cdb5ed634876240291 (patch) | |
tree | 8d5ec35b564d1e230c50714da00d073272caa6b1 /ui/gfx/platform_font_win.h | |
parent | 3a1fa641e17c3293c8df42a9abf6e858b6935014 (diff) | |
download | chromium_src-e34da193dd4c80adf30c63cdb5ed634876240291.zip chromium_src-e34da193dd4c80adf30c63cdb5ed634876240291.tar.gz chromium_src-e34da193dd4c80adf30c63cdb5ed634876240291.tar.bz2 |
Revert of Get all font unittests running with DirectWrite on Windows 7+ (patchset #11 id:220001 of https://codereview.chromium.org/844083002/)
Reason for revert:
breaks PlatformFontWinTest.DeriveFontWithHeight on xp and vista
Original issue's 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}
TBR=msw@chromium.org,asvitkine@chromium.org,ananta@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=442010
Review URL: https://codereview.chromium.org/820173005
Cr-Commit-Position: refs/heads/master@{#311242}
Diffstat (limited to 'ui/gfx/platform_font_win.h')
-rw-r--r-- | ui/gfx/platform_font_win.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gfx/platform_font_win.h b/ui/gfx/platform_font_win.h index e215849..11f94d4 100644 --- a/ui/gfx/platform_font_win.h +++ b/ui/gfx/platform_font_win.h @@ -172,6 +172,10 @@ class GFX_EXPORT PlatformFontWin : public PlatformFont { static HFontRef* CreateHFontRefFromGDI(HFONT font, const TEXTMETRIC& font_metrics); + // Returns a largest derived Font whose height does not exceed the height of + // |base_font|. + static Font DeriveWithCorrectedSize(HFONT base_font); + // Creates and returns a new HFontRef from the specified HFONT using metrics // from skia. Currently this is only used if we use DirectWrite for font // metrics. |