From 8f6445b83139349fa31a137496d54b1847a66d7c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 12 May 2015 12:24:22 -0700 Subject: 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 --- public/fpdf_sysfontinfo.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'public') diff --git a/public/fpdf_sysfontinfo.h b/public/fpdf_sysfontinfo.h index 00c9fab0e6..275ca84d55 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 @@ -192,6 +191,28 @@ typedef struct _FPDF_SYSFONTINFO { void (*DeleteFont)(struct _FPDF_SYSFONTINFO* pThis, void* hFont); } 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. -- cgit v1.2.3