Fix unittest HarfBuzz_UniscribeFallback on Windows 10
The main goal of this CL is to remove an usage of PlatformFontWin. The test RenderTextTest.HarfBuzz_UniscribeFallback is creating a PlatformFontWin class and directly manipulate the HFontRef/HFONT to put the localized name. The initial goal of test was to ensure the fast-path for font fallback is called. ShapeRuns is trying the following fonts: 1) PrimaryFont / SecondaryFont 2) GetFallbackFont (for a given text) a) win7 : Use of Uniscribe fallback b) win10 : Use of DWrite fallback 3) GetFallbackFonts (enumerate all fonts) The test was designed to force the fallback to hit 2), while impossible to succeed with 3). Unfortunately, on windows 10, the "Meiryo" font is not installed by default and it's part of the Japaneese extension. The font constructor replace it by Arial which is making the path 3) to be hitted and the test to (incorrectly) pass. We are adding checks that the font name and localized font name are kept correctly. We are adding a windows 10 localized font. R=asvitkine@chromium.org CC=dfried@chromium.org, robliao@chromium.org Bug: 944227 Change-Id: I7990e973d6702abee998ccafeee753b947cca0bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1554001 Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Reviewed-by:Alexei Svitkine <asvitkine@chromium.org> Reviewed-by:
Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#648702}
Showing
Please register or sign in to comment