summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMihai Varga <mihai.varga@collabora.com>2015-11-27 16:19:09 +0200
committerMihai Varga <mihai.mv13@gmail.com>2015-11-30 12:58:01 +0200
commit24d981998b5859c7601d5c804e0ee70c5fec280f (patch)
tree68b16ab67d27dc42e77f78fc1685259669bfb6f9 /include
parent88ab9d4aa09a8ce09fa4d03faefa32e57c530746 (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 5e86101f62af..2855f8b42fbe 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -376,6 +376,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
};