Add test of char to glyph round tripping.

This also tries to work around some surprising behavior on macOS, which
may cause attributing space glyphs to character 9 instead of 32.

This also updates the gdi character to glyph mapping for non BMP
characters on Windows 10. This forces all uniscribe script analysis to
simple to get just the default cmap mapping without shaping.

Change-Id: Id93a2de6de27ab61fbf034f5087e93e4c7e839ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215431
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 0d35136..111bebb 100644
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -1889,7 +1889,27 @@
     WORD outGlyphs[maxGlyphs];
     WORD logClust[numWCHAR];
     int numGlyphs;
-    HRZM(ScriptShape(hdc, scriptCache, utf16, numWCHAR, maxGlyphs, &si[0].a,
+    SCRIPT_ANALYSIS& script = si[0].a;
+    script.eScript = SCRIPT_UNDEFINED;
+    script.fRTL = FALSE;
+    script.fLayoutRTL = FALSE;
+    script.fLinkBefore = FALSE;
+    script.fLinkAfter = FALSE;
+    script.fLogicalOrder = FALSE;
+    script.fNoGlyphIndex = FALSE;
+    script.s.uBidiLevel = 0;
+    script.s.fOverrideDirection = 0;
+    script.s.fInhibitSymSwap = TRUE;
+    script.s.fCharShape = FALSE;
+    script.s.fDigitSubstitute = FALSE;
+    script.s.fInhibitLigate = FALSE;
+    script.s.fDisplayZWG = TRUE;
+    script.s.fArabicNumContext = FALSE;
+    script.s.fGcpClusters = FALSE;
+    script.s.fReserved = 0;
+    script.s.fEngineReserved = 0;
+    // For the future, 0x80040200 from here is USP_E_SCRIPT_NOT_IN_FONT
+    HRZM(ScriptShape(hdc, scriptCache, utf16, numWCHAR, maxGlyphs, &script,
                      outGlyphs, logClust, vsa, &numGlyphs),
          "Could not shape character.");
     if (1 == numGlyphs) {