NEW public API for pdfwindow font manipulation.

PDFium side of fix to make chromium free of private header
includes.  This moves the one snippet of contaminating code
from chrome to PDFium itself.

BUG=486818
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1126283004
diff --git a/fpdfsdk/include/pdfwindow/PWL_FontMap.h b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
index a7aac6d..2ff6c0f 100644
--- a/fpdfsdk/include/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/include/pdfwindow/PWL_FontMap.h
@@ -7,6 +7,7 @@
 #ifndef _PWL_FONTMAP_H_
 #define _PWL_FONTMAP_H_
 
+#include "../../../public/fpdf_sysfontinfo.h"
 #include "../fxedit/fx_edit.h"
 
 class CPDF_Document;
@@ -111,10 +112,7 @@
 	CFX_ByteString								GetNativeFont(FX_INT32 nCharset);
 
 public:
-	struct CharsetFontMap {
-		FX_INT32								charset;
-		const char*								fontname;
-	};
+    using CharsetFontMap = FPDF_CharsetFontMap;
 	static const CharsetFontMap					defaultTTFMap[];
 
 protected:
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/src/fpdf_sysfontinfo.cpp
index 9be2fe9..6bb41b8 100644
--- a/fpdfsdk/src/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/src/fpdf_sysfontinfo.cpp
@@ -6,6 +6,7 @@
 
 #include "../../public/fpdf_sysfontinfo.h"
 #include "../include/fsdk_define.h"
+#include "../include/pdfwindow/PWL_FontMap.h"
 
 class CSysFontInfo_Ext FX_FINAL : public IFX_SystemFontInfo
 {
@@ -94,6 +95,11 @@
 	CFX_GEModule::Get()->GetFontMgr()->SetSystemFontInfo(pFontInfo);
 }
 
+DLLEXPORT const FPDF_CharsetFontMap* STDCALL FPDF_GetDefaultTTFMap()
+{
+    return CPWL_FontMap::defaultTTFMap;
+}
+
 struct FPDF_SYSFONTINFO_DEFAULT : public FPDF_SYSFONTINFO
 {
 	IFX_SystemFontInfo*	m_pFontInfo;
diff --git a/public/fpdf_sysfontinfo.h b/public/fpdf_sysfontinfo.h
index 00c9fab..275ca84 100644
--- a/public/fpdf_sysfontinfo.h
+++ b/public/fpdf_sysfontinfo.h
@@ -32,7 +32,6 @@
 extern "C" {
 #endif
 
-
 /** 
  * Interface: FPDF_SYSFONTINFO
  *			Interface for getting system font information and font mapping
@@ -193,6 +192,28 @@
 } FPDF_SYSFONTINFO;
 
 /**
+ * Struct: FPDF_CharsetFontMap
+ *    Provides the name of a font to use for a given charset value.
+ **/
+typedef struct FPDF_CharsetFontMap_
+{
+    int charset;  // Character Set Enum value, see FXFONT_*_CHARSET above.
+    const char* fontname;  // Name of default font to use with that charset.
+} FPDF_CharsetFontMap;
+
+/**
+ * Function: FPDF_GetDefaultTTFMap
+ *    Returns a pointer to the default character set to TT Font name map. The
+ *    map is an array of FPDF_CharsetFontMap structs, with its end indicated
+ *    by a { -1, NULL } entry.
+ * Parameters:
+ *     None.
+ * Return Value:
+ *     Pointer to the Charset Font Map.
+ **/
+DLLEXPORT const FPDF_CharsetFontMap* STDCALL FPDF_GetDefaultTTFMap();
+
+/**
  * Function: FPDF_AddInstalledFont
  *			Add a system font to the list in Foxit SDK.
  * Comments: