Avoid invoking span() directly on char literals.

The PDFium idiom for this is ByteStringView("foo").span(), as this
avoids the thorny issue of whether to include the terminator (typically
"no", leading to manual length specifications).

A future version of the chromium compiler plugin may flag these as
warnings.

-- re-write one section of win code to use widestrings directly.

Change-Id: I157919e39adfff18b5d03725bfbf6741ab99cd1b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/120252
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Thomas Sepez <tsepez@google.com>
diff --git a/core/fdrm/fx_crypt_unittest.cpp b/core/fdrm/fx_crypt_unittest.cpp
index 5d65508..e69ae50 100644
--- a/core/fdrm/fx_crypt_unittest.cpp
+++ b/core/fdrm/fx_crypt_unittest.cpp
@@ -188,7 +188,7 @@
 
 TEST(FXCRYPT, ContextWithStringData) {
   CRYPT_md5_context ctx = CRYPT_MD5Start();
-  CRYPT_MD5Update(&ctx, pdfium::as_bytes(pdfium::make_span("abc", 3u)));
+  CRYPT_MD5Update(&ctx, ByteStringView("abc").unsigned_span());
 
   uint8_t digest[16];
   CRYPT_MD5Finish(&ctx, digest);
diff --git a/core/fxge/win32/cwin32_platform.cpp b/core/fxge/win32/cwin32_platform.cpp
index 4170236..ec9ac95 100644
--- a/core/fxge/win32/cwin32_platform.cpp
+++ b/core/fxge/win32/cwin32_platform.cpp
@@ -30,11 +30,11 @@
 
 struct Variant {
   const char* m_pFaceName;
-  pdfium::raw_span<const char> m_pVariantName;
+  const wchar_t* m_pVariantName;
 };
 
 constexpr Variant kVariantNames[] = {
-    {"DFKai-SB", pdfium::make_span("\x19\x6A\x77\x69\xD4\x9A")},
+    {"DFKai-SB", L"\x6A19\x6977\x9AD4"},
 };
 
 struct Substs {
@@ -382,8 +382,7 @@
     if (new_face != variant.m_pFaceName)
       continue;
 
-    WideString wsName =
-        WideString::FromUTF16LE(pdfium::as_bytes(variant.m_pVariantName));
+    WideString wsName(variant.m_pVariantName);
     if (wsFace == wsName)
       return hFont;
   }