• asvitkine@chromium.org's avatar
    Implement font fallback in RenderTextWin, try #2. · 5a183b3b
    asvitkine@chromium.org authored
    The original change (http://codereview.chromium.org/8565011/) was
    reverted due to failing NativeTextfieldViewsTest.HitInsideTextAreaTest.
    
    The test was too strict when comparing cursor bounds and failed due
    to font fallback causing height differences in cursor bounds. This
    updated CL makes the test only check the x value of cursor bounds.
    
    Original CL description:
    
    This is done by using a metafile to capture the font
    that Uniscribe would use to render the text (since
    there is no API to get this from Uniscribe itself).
    
    Makes SCRIPT_CACHE be per-run, since different runs
    may have different fonts and the SCRIPT_CACHE cannot
    be re-used between these.
    
    This is similar to what is done in WebKit in FontCacheWin.cpp
    
    BUG=90426,104234
    TEST=Run chrome.exe --use-pure-views and paste some Hebrew
    text into the omnibox. It should show up properly.
    Review URL: http://codereview.chromium.org/8570003
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110749 0039d316-1c4b-4281-b951-d872f2087c98
    5a183b3b
native_textfield_views_unittest.cc 53.7 KB