summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-08-01 01:28:49 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-01 01:28:49 +0000
commit53d4f0a4526ef996caf5005ae84406a9467423f2 (patch)
treecf86d5f7bdd8996e5614fb00113fe6df2ddefdaf /public
parentcede561c5ae665a563409ba3bfc93c3cd6da5248 (diff)
downloadpdfium-53d4f0a4526ef996caf5005ae84406a9467423f2.tar.xz
Add FPDFText_GetFontName() API
This follows the same pattern as DefaultGetFaceName(), so the client has to call this function twice, but allocation of the string buffer happens outside pdfium. Change-Id: I06b7dcd00aca9b9b94799dad3f139617d7f5451e Reviewed-on: https://pdfium-review.googlesource.com/38870 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_edit.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index b97a7adbd9..4d5aa9c48a 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -1257,6 +1257,24 @@ FPDFPageObj_CreateTextObj(FPDF_DOCUMENT document,
FPDF_EXPORT int FPDF_CALLCONV FPDFText_GetTextRenderMode(FPDF_PAGEOBJECT text);
// Experimental API.
+// Get the font name of a text object.
+//
+// text - the handle to the text object.
+// buffer - the address of a buffer that receives the font name.
+// length - the size, in bytes, of |buffer|.
+//
+// Returns the number of bytes in the font name (including the trailing NUL
+// character) on success, 0 on error.
+//
+// Regardless of the platform, the |buffer| is always in UTF-8 encoding.
+// If |length| is less than the returned length, or |buffer| is NULL, |buffer|
+// will not be modified.
+FPDF_EXPORT unsigned long FPDF_CALLCONV
+FPDFTextObj_GetFontName(FPDF_PAGEOBJECT text,
+ void* buffer,
+ unsigned long length);
+
+// Experimental API.
// Get number of page objects inside |form_object|.
//
// form_object - handle to a form object.