add getFontFace in cre.cpp and credocument.lua

also move self.font_face to readerfont module
pull/2/merge
Qingping Hou 12 years ago
parent 62f73c177b
commit 9e6940621b

@ -174,6 +174,14 @@ static int getFontSize(lua_State *L) {
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()
*/
@ -455,6 +463,7 @@ static const struct luaL_Reg credocument_meth[] = {
{"getCurrentXPointer", getCurrentXPointer},
{"getFullHeight", getFullHeight},
{"getFontSize", getFontSize},
{"getFontFace", getFontFace},
{"getToc", getTableOfContent},
/*--- set methods ---*/
{"setFontFace", setFontFace},

Loading…
Cancel
Save