Relanding this with font test fixes for gdi font tests on XP
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.
5. Return a derived font from the DeriveFontWithHeight function if it matches the font size.
5. Ensure that the requested_font_size_ member in the HFontRef structure is set to the correct font size by going
through the text metrics API. This is required because for small font sizes, the size as reported by LOGFONT is not correct.
For e.g. if the height is -1, the actual font size is 2 on my XP machine. This causes the DeriveFontWithHeight test to fail.
BUG=442010
R=msw
Review URL: https://codereview.chromium.org/
849043002
Cr-Commit-Position: refs/heads/master@{#311594}