• asvitkine@chromium.org's avatar
    Fix RenderTextWin CJK font linking size on Windows XP. · 2a36be1a
    asvitkine@chromium.org authored
    On Windows XP, the new font must be picked such that the font height, not the font size, is the same as the previous font.
    
    Add a PlatformFontWin::DeriveFontWithHeight() function that provided the functionality needed for the above and modifies PlatformFontWin to support the above by not assuming LOGFONT.lfHeight is always negative. Instead, it now gets the font size from TEXTMETRIC.
    
    One side effect of this change is that the GetFontSize() will now return the actual font size that will be used, rather than the input parameter when creating the font. A test in label_unittest.cc depended on this and is updated as part of this CL.
    
    BUG=122143, 105550
    TEST=Run Chrome on English Windows XP with CJK languages
    installed. Go to a website with a Chinese title. The size
    of the Chinese text in the tab title should be the same
    as in Chrome 19 (which has use_canvas_skia=0 setting).
    Also, existing unit tests and newly-added platform_font_win_unittest.cc.
    
    Review URL: http://codereview.chromium.org/10228009
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134600 0039d316-1c4b-4281-b951-d872f2087c98
    2a36be1a
ui_unittests.gypi 6.56 KB