mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #136 from houqp/master
workaround for broken font setting in crereader.
This commit is contained in:
4
Makefile
4
Makefile
@@ -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-*/ && \
|
||||
|
||||
3
cre.cpp
3
cre.cpp
@@ -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;
|
||||
|
||||
Submodule kpvcrlib/crengine updated: 73805ee9b0...7a73d16665
12
kpvcrlib/lvrend_node_type_face.patch
Normal file
12
kpvcrlib/lvrend_node_type_face.patch
Normal file
@@ -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 );
|
||||
Reference in New Issue
Block a user