DescriptionRetrieve 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
Committed: https://crrev.com/f2d0aaebeb1f0b390b62082f77176ee303942ffb
Cr-Commit-Position: refs/heads/master@{#302547}
Patch Set 1 #Patch Set 2 : Fixed comment #
Total comments: 6
Patch Set 3 : Code review comments from scottmg #Patch Set 4 : Removed incorrect code #Patch Set 5 : Fixed build error #
Messages
Total messages: 19 (6 generated)
|