Retrieve font metrics from skia if DirectWrite is enabled for font metrics...
Retrieve font metrics from skia if DirectWrite is enabled for font metrics calculations in the chrome browser UI. The previous patch for getting the correct font metrics from DirectWrite https://codereview.chromium.org/692633003/ was wrong as it did not return the correct font metrics in all cases. Getting the metrics from skia ensures that we get the same font metrics which would be used by skia for rendering. Changes in this patch are as below:- 1. Removed DirectWrite factory code from PlatformFontWin. The PlatformFontWin::ConvertGDIFontToDirectWriteFont function has been replaced by the CreateHFontRefFromSkia function. This function is called if DirectWrite is enabled in the browser which sets a static bool on the PlatformFontWin class. BUG=428645,427804,427802 Review URL: https://codereview.chromium.org/696913002 Cr-Commit-Position: refs/heads/master@{#302547}
Showing
Please register or sign in to comment