Skip to content

Commit

Permalink
Bump crengine and add cre.setEmbeddedFonts() (#501)
Browse files Browse the repository at this point in the history
crengine: fix parsing of long decimal values in css and
new Polish and French hyph dictionaries
added cre.setEmbeddedFonts() to make this crengine feature available
to koreader.
  • Loading branch information
poire-z committed Aug 28, 2017
1 parent e1974cb commit 099793e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions cre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,14 @@ static int setEmbeddedStyleSheet(lua_State *L) {
return 0;
}

static int setEmbeddedFonts(lua_State *L) {
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");

doc->text_view->doCommand(DCMD_SET_DOC_FONTS, luaL_checkint(L, 2));

return 0;
}

static int toggleFontBolder(lua_State *L) {
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");

Expand Down Expand Up @@ -1525,6 +1533,7 @@ static const struct luaL_Reg credocument_meth[] = {
{"setDefaultInterlineSpace", setDefaultInterlineSpace},
{"setStyleSheet", setStyleSheet},
{"setEmbeddedStyleSheet", setEmbeddedStyleSheet},
{"setEmbeddedFonts", setEmbeddedFonts},
{"setPageMargins", setPageMargins},
{"setVisiblePageCount", setVisiblePageCount},
{"adjustFontSizes", adjustFontSizes},
Expand Down

0 comments on commit 099793e

Please sign in to comment.