diff options
author | ananta <ananta@chromium.org> | 2014-12-17 17:30:31 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-18 01:31:03 +0000 |
commit | 461f93fb6561c9d6df54fbcf07d038cc203161b0 (patch) | |
tree | acc732bb4123b06243d5e15b924e133a91124806 /ui/gfx/win | |
parent | a6ebe113c7bedbe4583c792db7d2d320dba00b2f (diff) | |
download | chromium_src-461f93fb6561c9d6df54fbcf07d038cc203161b0.zip chromium_src-461f93fb6561c9d6df54fbcf07d038cc203161b0.tar.gz chromium_src-461f93fb6561c9d6df54fbcf07d038cc203161b0.tar.bz2 |
Fix views tab baseline and omnibox size regressions.
Fixes in this patch include the following:-
1. In the PlatformFontWin::CreateHFontRefFromSkia function we round the caps height, baseline, and
the internal leading value up via ceil. This ensures that the text is positioned correctly and is scaled
to the correct size.
2. The gfx_unittests now call the MaybeInitializeDirectWrite function at startup. This ensures that they will
use DirectWrite wherever available (Win 7+).
3. The PlatformFontWin::CreateHFontRefFromSkia now takes in the TEXTMETRICS as an argument. This is used to
handle the case where in the LOGFONT structure contains a positive height which basically is the font height
without the internal leading flag.
4. Disabled the PlatformFontWinTest.DeriveFontWithHeight and PlatformFontWinTest.DeriveFontWithHeight_Consistency for
DirectWrite with a TODO to fix them with the associated bug.
5. Removed the code to calculate the font size for DirectWrite. This is not needed as we can safely use the
passed in GDI font size as the actual font size.
BUG=434860,442010
TEST=PlatformFontWinTest.Metrics_SkiaVersusGDI
Review URL: https://codereview.chromium.org/792553004
Cr-Commit-Position: refs/heads/master@{#308912}
Diffstat (limited to 'ui/gfx/win')
-rw-r--r-- | ui/gfx/win/direct_write.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/gfx/win/direct_write.h b/ui/gfx/win/direct_write.h index 6c306e4..f16e45c 100644 --- a/ui/gfx/win/direct_write.h +++ b/ui/gfx/win/direct_write.h @@ -15,6 +15,7 @@ GFX_EXPORT bool ShouldUseDirectWrite(); GFX_EXPORT void MaybeInitializeDirectWrite(); +// Returns true if we are using DirectWrite for font metrics and rendering. GFX_EXPORT bool IsDirectWriteEnabled(); } // namespace win |