diff options
author | npm <npm@chromium.org> | 2016-11-08 16:48:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-08 16:48:36 -0800 |
commit | 788217d77c9933614efbd778b6f6ee0008f4f9d9 (patch) | |
tree | 6af8d399b736e59971243ac92a594cdb8aaa5297 /public/fpdf_sysfontinfo.h | |
parent | 28c888b8ee6d1da93cffaa8c14833ddc4986cc79 (diff) | |
download | pdfium-788217d77c9933614efbd778b6f6ee0008f4f9d9.tar.xz |
Add FPDF_FreeDefaultSystemFontInfo API
Added method that will cast into FPDF_SYSFONTINFO_DEFAULT and delete.
This will allow using FPDF_GetDefaultSystemFontInfo() without memory
management problems.
Review-Url: https://codereview.chromium.org/2485283002
Diffstat (limited to 'public/fpdf_sysfontinfo.h')
-rw-r--r-- | public/fpdf_sysfontinfo.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/public/fpdf_sysfontinfo.h b/public/fpdf_sysfontinfo.h index c2da74b70b..d75aa19629 100644 --- a/public/fpdf_sysfontinfo.h +++ b/public/fpdf_sysfontinfo.h @@ -290,11 +290,24 @@ DLLEXPORT void STDCALL FPDF_SetSystemFontInfo(FPDF_SYSFONTINFO* pFontInfo); * Pointer to a FPDF_SYSFONTINFO structure describing the default *interface. * Or NULL if the platform doesn't have a default interface. - * Application should call FPDF_FreeMemory to free the returned - *pointer. + * Application should call FPDF_FreeDefaultSystemFontInfo to free the + *returned pointer. **/ DLLEXPORT FPDF_SYSFONTINFO* STDCALL FPDF_GetDefaultSystemFontInfo(); +/** + * Function: FPDF_FreeDefaultSystemFontInfo + * Free a default system font info interface + * Comments: + * This function should be called on the output from + *FPDF_SetSystemFontInfo once it is no longer needed by the client. + * Parameters: + * pFontInfo - Pointer to a FPDF_SYSFONTINFO structure + * Return Value: + * None + **/ +DLLEXPORT void FPDF_FreeDefaultSystemFontInfo(FPDF_SYSFONTINFO* pFontInfo); + #ifdef __cplusplus } #endif |