summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMihai Varga <mihai.varga@collabora.com>2015-11-27 16:19:09 +0200
committerAndras Timar <andras.timar@collabora.com>2015-12-13 16:47:01 +0100
commitabb4ef4e23f684fff3911b51c35a0718dc277bde (patch)
treecf4815f86c8b0308cb8395badce0c86fa92630be /include
parent48ef3c7a4a2ababe9c2ce5c1fcf167c909441862 (diff)
LOK: renderFont method
Renders the given font in a virtual output device. For now it iterates over a list of fonts until it finds the one that matches the requested font. Change-Id: Ie4ecc3a1441519840d8f4f4a890e92670759b4fc
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h6
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx12
2 files changed, 18 insertions, 0 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 5189cca5eb5e..a78c0aab4d07 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -202,6 +202,12 @@ struct _LibreOfficeKitDocumentClass
int (*getView) (LibreOfficeKitDocument* pThis);
/// @see lok::Document::getViews().
int (*getViews) (LibreOfficeKitDocument* pThis);
+
+ /// @see lok::Document::renderFont().
+ unsigned char* (*renderFont) (LibreOfficeKitDocument* pThis,
+ const char* pFontName,
+ int* pFontWidth,
+ int* pFontHeight);
#endif // LOK_USE_UNSTABLE_API
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index a0a420d9dfa7..99600892b39e 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -373,6 +373,18 @@ public:
{
return mpDoc->pClass->getViews(mpDoc);
}
+
+ /**
+ * Paints a font name to be displayed in the font list
+ * @param pFontName the font to be painted
+ */
+ inline unsigned char* renderFont(const char *pFontName,
+ int *pFontWidth,
+ int *pFontHeight)
+ {
+ return mpDoc->pClass->renderFont(mpDoc, pFontName, pFontWidth, pFontHeight);
+ }
+
#endif // LOK_USE_UNSTABLE_API
};