From 4c48b107c6d1e3d3029910062368d8d954e8f28a Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 13 Jun 2018 18:23:46 +0000 Subject: Add FPDFText_LoadStandardFont to public API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: pdfium:978 Change-Id: I0dcffdfd1b19b83e5234da7791cb3f3e52cc257b Reviewed-on: https://pdfium-review.googlesource.com/35110 Commit-Queue: Nicolás Peña Moreno Reviewed-by: Henrique Nakashima --- public/fpdf_edit.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'public') diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h index 338b42b588..d3d7c4b277 100644 --- a/public/fpdf_edit.h +++ b/public/fpdf_edit.h @@ -1022,7 +1022,7 @@ FPDFText_SetText(FPDF_PAGEOBJECT text_object, FPDF_WIDESTRING text); // type. // cid - a boolean specifying if the font is a CID font or not. // -// The loaded font can be closed using FPDF_Font_Close. +// The loaded font can be closed using FPDFFont_Close. // // Returns NULL on failure FPDF_EXPORT FPDF_FONT FPDF_CALLCONV FPDFText_LoadFont(FPDF_DOCUMENT document, @@ -1031,6 +1031,21 @@ FPDF_EXPORT FPDF_FONT FPDF_CALLCONV FPDFText_LoadFont(FPDF_DOCUMENT document, int font_type, FPDF_BOOL cid); +// Experimental API. +// Loads one of the standard 14 fonts per PDF spec 1.7 page 416. The preferred +// way of using font style is using a dash to separate the name from the style, +// for example 'Helvetica-BoldItalic'. +// +// document - handle to the document. +// font - string containing the font name, without spaces. +// +// The loaded font should NOT be closed using FPDFFont_Close. It will be +// unloaded during the document's destruction. +// +// Returns NULL on failure. +FPDF_EXPORT FPDF_FONT FPDF_CALLCONV +FPDFText_LoadStandardFont(FPDF_DOCUMENT document, FPDF_BYTESTRING font); + // DEPRECATED as of May 2018. This API will be removed in the future. Please // use FPDFPageObj_SetFillColor instead. // -- cgit v1.2.3