Merge pull request #136 from houqp/master

workaround for broken font setting in crereader.
pull/2/merge
Dobrica Pavlinušić 12 years ago
commit cb54c09c31

@ -138,6 +138,10 @@ fetchthirdparty:
# CREngine patch: disable fontconfig
grep USE_FONTCONFIG $(CRENGINEDIR)/crengine/include/crsetup.h && grep -v USE_FONTCONFIG $(CRENGINEDIR)/crengine/include/crsetup.h > /tmp/new && mv /tmp/new $(CRENGINEDIR)/crengine/include/crsetup.h || echo "USE_FONTCONFIG already disabled"
test -f mupdf-thirdparty.zip || wget http://www.mupdf.com/download/mupdf-thirdparty.zip
# CREngine patch: change child nodes' type face
# @TODO replace this dirty hack 24.04 2012 (houqp)
cd kpvcrlib/crengine/crengine/src && \
patch -N -p0 < ../../../lvrend_node_type_face.patch
unzip mupdf-thirdparty.zip -d mupdf
# dirty patch in MuPDF's thirdparty liby for CREngine
cd mupdf/thirdparty/jpeg-*/ && \

@ -269,6 +269,7 @@ static int setFontFace(lua_State *L) {
const char *face = luaL_checkstring(L, 2);
doc->text_view->setDefaultFontFace(lString8(face));
//fontMan->SetFallbackFontFace(lString8(face));
return 0;
}
@ -364,6 +365,7 @@ static int cursorRight(lua_State *L) {
//LVDocView *tv = doc->text_view;
//ldomXPointer p = tv->getCurrentPageMiddleParagraph();
//lString16 s = p.getText();
//lString16 s = p.toString();
//printf("~~~~~~~~~~%s\n", UnicodeToLocal(s).c_str());
@ -378,7 +380,6 @@ static int cursorRight(lua_State *L) {
//LVPageWordSelector sel(doc->text_view);
//doc->text_view->doCommand(DCMD_SELECT_FIRST_SENTENCE);
//sel.moveBy(DIR_RIGHT, 2);
//sel.updateSelection();
//printf("---------------- %s\n", UnicodeToLocal(sel.getSelectedWord()->getText()).c_str());
return 0;

@ -1 +1 @@
Subproject commit 73805ee9b00c03160816e63239df5d1968f66a9d
Subproject commit 7a73d1666538fe9dd7d84d7e18135b03c21be2ca

@ -0,0 +1,12 @@
--- lvrend.cpp 2012-04-24 10:27:33.000000000 +0800
+++ lvrend-patched.cpp 2012-04-24 10:27:28.000000000 +0800
@@ -1902,7 +1902,8 @@
UPDATE_STYLE_FIELD( font_style, css_fs_inherit );
UPDATE_STYLE_FIELD( font_weight, css_fw_inherit );
UPDATE_STYLE_FIELD( font_family, css_ff_inherit );
- UPDATE_STYLE_FIELD( font_name, "" );
+ //UPDATE_STYLE_FIELD( font_name, "" );
+ pstyle->font_name = parent_font.get()->getTypeFace();
UPDATE_LEN_FIELD( font_size );
//UPDATE_LEN_FIELD( text_indent );
spreadParent( pstyle->text_indent, parent_style->text_indent );
Loading…
Cancel
Save