summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-02-27 10:41:41 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-27 21:10:18 +0000
commitbe90aaea3977eadeee589cdda66c61d06d6535b0 (patch)
tree05e11fd59e26378b9b9760bb2614a5f09baaacc9 /public
parent3f72fb4a3c983de00bae9c8437a1c09df9c9955b (diff)
downloadpdfium-be90aaea3977eadeee589cdda66c61d06d6535b0.tar.xz
Add public API for creating a Type1 font
Given a stream of data, we create a type1 font and fill up the required dictionary entries according to PDF spec 1.7. Table 5.8 describes Type 1 font dictionaries, and Table 5.19 describes font descriptors. BUG=pdfium:667 Change-Id: I571b09fb533467d77ed0104e613726387aec1f87 Reviewed-on: https://pdfium-review.googlesource.com/2835 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index c8d7a44c8e..3350b5c6a7 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -406,6 +406,18 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPageObj_NewTextObj(FPDF_DOCUMENT document,
DLLEXPORT FPDF_BOOL STDCALL FPDFText_SetText(FPDF_PAGEOBJECT text_object,
FPDF_BYTESTRING text);
+// Returns a type 1 font object loaded from a stream of data. The font is loaded
+// into the document. The caller does not need to free the returned object.
+//
+// document - handle to the document.
+// data - the stream of data, which will be copied by the font object.
+// size - size of the stream, in bytes.
+//
+// Returns NULL on failure
+DLLEXPORT FPDF_FONT STDCALL FPDFText_LoadType1Font(FPDF_DOCUMENT document,
+ const uint8_t* data,
+ uint32_t size);
+
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus