|
|
@ -174,6 +174,14 @@ static int getFontSize(lua_State *L) {
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int getFontFace(lua_State *L) {
|
|
|
|
|
|
|
|
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lua_pushstring(L, doc->text_view->getDefaultFontFace().c_str());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* helper function for getTableOfContent()
|
|
|
|
* helper function for getTableOfContent()
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -455,6 +463,7 @@ static const struct luaL_Reg credocument_meth[] = {
|
|
|
|
{"getCurrentXPointer", getCurrentXPointer},
|
|
|
|
{"getCurrentXPointer", getCurrentXPointer},
|
|
|
|
{"getFullHeight", getFullHeight},
|
|
|
|
{"getFullHeight", getFullHeight},
|
|
|
|
{"getFontSize", getFontSize},
|
|
|
|
{"getFontSize", getFontSize},
|
|
|
|
|
|
|
|
{"getFontFace", getFontFace},
|
|
|
|
{"getToc", getTableOfContent},
|
|
|
|
{"getToc", getTableOfContent},
|
|
|
|
/*--- set methods ---*/
|
|
|
|
/*--- set methods ---*/
|
|
|
|
{"setFontFace", setFontFace},
|
|
|
|
{"setFontFace", setFontFace},
|
|
|
|