diff options
author | Nicolas Pena <npm@chromium.org> | 2018-08-17 19:54:23 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-17 19:54:23 +0000 |
commit | 1b2b76d634ba3716ee43a553cd952927a7d262a2 (patch) | |
tree | dc7faab94ae4a2caaad83c2b027819634cf48037 /public/fpdf_text.h | |
parent | e13a068f29061b9c6d24189bc4dc87a9111cdb1b (diff) | |
download | pdfium-1b2b76d634ba3716ee43a553cd952927a7d262a2.tar.xz |
Add FPDFText_GetFontInfo
Bug: pdfium:929
Change-Id: I9da03a1e317cff69ec4c76b69289cfa753b6bb77
Reviewed-on: https://pdfium-review.googlesource.com/40531
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'public/fpdf_text.h')
-rw-r--r-- | public/fpdf_text.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/public/fpdf_text.h b/public/fpdf_text.h index 3502337443..feb54fb5ab 100644 --- a/public/fpdf_text.h +++ b/public/fpdf_text.h @@ -87,6 +87,31 @@ FPDFText_GetUnicode(FPDF_TEXTPAGE text_page, int index); FPDF_EXPORT double FPDF_CALLCONV FPDFText_GetFontSize(FPDF_TEXTPAGE text_page, int index); +// Experimental API. +// Function: FPDFText_GetFontInfo +// Get the font name and flags of a particular character. +// Parameters: +// text_page - Handle to a text page information structure. +// Returned by FPDFText_LoadPage function. +// index - Zero-based index of the character. +// buffer - A buffer receiving the font name. +// buflen - The length of |buffer| in bytes. +// flags - Optional pointer to an int receiving the font flags. +// These flags should be interpreted per PDF spec 1.7 Section 5.7.1 +// Font Descriptor Flags. +// Return value: +// On success, return the length of the font name, including the +// trailing NUL character, in bytes. If this length is less than or +// equal to |length|, |buffer| is set to the font name, |flags| is +// set to the font flags. |buffer| is in UTF-8 encoding. Return 0 on +// failure. +FPDF_EXPORT unsigned long FPDF_CALLCONV +FPDFText_GetFontInfo(FPDF_TEXTPAGE text_page, + int index, + void* buffer, + unsigned long buflen, + int* flags); + // Function: FPDFText_GetCharBox // Get bounding box of a particular character. // Parameters: |